mtd: introduce mtd_can_have_bb helper
This patch introduces new 'mtd_can_have_bb()' helper function which checks whether the flash can have bad eraseblocks. Then it changes all the direct 'mtd->block_isbad' use cases with 'mtd_can_have_bb()'. Signed-off-by:Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by:
David Woodhouse <David.Woodhouse@intel.com>
Showing
- drivers/mtd/mtdchar.c 1 addition, 4 deletionsdrivers/mtd/mtdchar.c
- drivers/mtd/mtdconcat.c 1 addition, 1 deletiondrivers/mtd/mtdconcat.c
- drivers/mtd/mtdoops.c 2 additions, 2 deletionsdrivers/mtd/mtdoops.c
- drivers/mtd/mtdswap.c 2 additions, 2 deletionsdrivers/mtd/mtdswap.c
- drivers/mtd/nftlcore.c 1 addition, 1 deletiondrivers/mtd/nftlcore.c
- drivers/mtd/redboot.c 2 additions, 2 deletionsdrivers/mtd/redboot.c
- drivers/mtd/tests/mtd_readtest.c 1 addition, 2 deletionsdrivers/mtd/tests/mtd_readtest.c
- drivers/mtd/tests/mtd_speedtest.c 1 addition, 2 deletionsdrivers/mtd/tests/mtd_speedtest.c
- drivers/mtd/tests/mtd_stresstest.c 1 addition, 2 deletionsdrivers/mtd/tests/mtd_stresstest.c
- drivers/mtd/tests/mtd_torturetest.c 1 addition, 1 deletiondrivers/mtd/tests/mtd_torturetest.c
- drivers/mtd/ubi/build.c 1 addition, 1 deletiondrivers/mtd/ubi/build.c
- include/linux/mtd/mtd.h 7 additions, 0 deletionsinclude/linux/mtd/mtd.h
Loading
Please register or sign in to comment