]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: mtdchar: add missing initializer on raw write
authorPeter Wippich <pewi@gw-instruments.de>
Mon, 6 Jun 2011 13:50:58 +0000 (15:50 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Tue, 16 Aug 2011 13:44:15 +0000 (16:44 +0300)
commitaf6245a3609f2043c75d22bb511b448f6bdb3695
treefede93d797e7c978061bf25a86eb83c6c017b306
parentb80f0ab228adfc26d0320a8106bbd9840678aca0
mtd: mtdchar: add missing initializer on raw write

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>
Cc: stable@kernel.org
Tested-by: Ricard Wanderlof <ricardw@axis.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/mtdchar.c