mtd: mtdchar: add missing initializer on raw write
commit1ae8bbc2af2d188dcce1c8d32831ce6bccbaecde
authorPeter Wippich <pewi@gw-instruments.de>
Mon, 6 Jun 2011 13:50:58 +0000 (6 15:50 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 26 Nov 2011 17:10:33 +0000 (26 09:10 -0800)
tree2dcc3f7586dba467e806fc92bf935126c80cd32e
parent7a0d6aef962b19ac2780bec718a852aa975db618
mtd: mtdchar: add missing initializer on raw write

commit bf5140817b2d65faac9b32fc9057a097044ac35b upstream.

On writes in MODE_RAW the mtd_oob_ops struct is not sufficiently
initialized which may cause nandwrite to fail. With this patch
it is possible to write raw nand/oob data without additional ECC
(either for testing or when some sectors need different oob layout
e.g. bootloader) like
nandwrite  -n -r -o  /dev/mtd0 <myfile>

Signed-off-by: Peter Wippich <pewi@gw-instruments.de>
Tested-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/mtd/mtdchar.c