]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: nand: add accessors, macros for in-memory BBT
authorBrian Norris <computersforpeace@gmail.com>
Wed, 31 Jul 2013 00:52:55 +0000 (17:52 -0700)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 6 Aug 2013 13:56:28 +0000 (16:56 +0300)
commitc8baa450f59cd4a63d319a2e230ba7c857cc6d36
tree17c70b9a6e4c6c723661b03658ca4ed3106fa6d9
parente79265ba6bdb31437bd4c3e7911950f9d1262a07
mtd: nand: add accessors, macros for in-memory BBT

There is an abundance of magic numbers and complicated shifting/masking
logic in the in-memory BBT code which makes the code unnecessary complex
and hard to read.

This patch adds macros to represent the 00b, 01b, 10b, and 11b
memory-BBT magic numbers, as well as two accessor functions for reading
and marking the memory-BBT bitfield for a given block.

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