]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: move zero length verification to MTD API functions
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Mon, 6 Feb 2012 11:27:43 +0000 (13:27 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Mar 2012 23:32:19 +0000 (00:32 +0100)
commit5029c780b7bc1282b647db9c35ae0124b3d42e80
treeccb7a9aea7b77481fa3474124218521e0c32de82
parent7e1a6e14b614dd6b98710884090f3adae94d6157
mtd: move zero length verification to MTD API functions

In many places in drivers we verify for the zero length, but this is very
inconsistent across drivers. This is obviously the right thing to do, though.
This patch moves the check to the MTD API functions instead and removes a lot
of duplication.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
13 files changed:
drivers/mtd/chips/cfi_cmdset_0001.c
drivers/mtd/chips/cfi_cmdset_0002.c
drivers/mtd/chips/cfi_cmdset_0020.c
drivers/mtd/devices/block2mtd.c
drivers/mtd/devices/lart.c
drivers/mtd/devices/m25p80.c
drivers/mtd/devices/mtd_dataflash.c
drivers/mtd/devices/spear_smi.c
drivers/mtd/devices/sst25l.c
drivers/mtd/lpddr/lpddr_cmds.c
drivers/mtd/maps/vmu-flash.c
drivers/mtd/mtdcore.c
drivers/mtd/nand/nand_base.c