]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: nand: hide in-memory BBT implementation details
authorBrian Norris <computersforpeace@gmail.com>
Wed, 31 Jul 2013 00:52:59 +0000 (17:52 -0700)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 6 Aug 2013 13:56:34 +0000 (16:56 +0300)
commitdaee02e217baee4dab756b8dcffc6a7dc9893b75
tree9e4cd381d3abfa5075dceb1ff544908645431a4b
parent666f508f78ba5439d08e4c9cc7e17ae39048b3d0
mtd: nand: hide in-memory BBT implementation details

nand_base.c shouldn't have to know the implementation details of
nand_bbt's in-memory BBT. Specifically, nand_base shouldn't perform the
bit masking and shifting to isolate a BBT entry.

Instead, just move some of the BBT code into a new nand_markbad_bbt()
interface. This interface allows external users (i.e., nand_base) to
mark a single block as bad in the BBT. Then nand_bbt will take care of
modifying the in-memory BBT and updating the flash-based BBT (if
applicable).

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/nand/nand_base.c
drivers/mtd/nand/nand_bbt.c
include/linux/mtd/nand.h