]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: nand: refactor chip->block_markbad interface
authorBrian Norris <computersforpeace@gmail.com>
Wed, 31 Jul 2013 00:52:58 +0000 (17:52 -0700)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 6 Aug 2013 13:56:33 +0000 (16:56 +0300)
commit666f508f78ba5439d08e4c9cc7e17ae39048b3d0
tree2411a390a1c5350baaf152e431e579a2487de57a
parentcf7585f37d38df7923d2d2a09e56e01f19993a13
mtd: nand: refactor chip->block_markbad interface

The chip->block_markbad pointer should really only be responsible for
writing a bad block marker for new bad blocks. It should not take care
of BBT-related functionality, nor should it handle bookkeeping of bad
block stats.

This patch refactors the 3 users of the block_markbad interface (plus
the default nand_base implementation) so that the common code is kept in
nand_block_markbad_lowlevel(). It removes some inconsistencies between
the various implementations and should allow for more centralized
improvements in the future.

Because gpmi-nand no longer needs the nand_update_bbt() function, let's
stop exporting it as well.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Huang Shijie <b32955@freescale.com> (for gpmi-nand parts)
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/nand/docg4.c
drivers/mtd/nand/gpmi-nand/gpmi-nand.c
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
drivers/mtd/nand/sm_common.c