]> git.baikalelectronics.ru Git - kernel.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)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 30 Aug 2013 15:42:48 +0000 (16:42 +0100)
commitcb8ea69e932fa9c0b6b72b1262a1f0e7fc06aeca
tree17c70b9a6e4c6c723661b03658ca4ed3106fa6d9
parent251eb0a65d0335f5c17ab3bbaeb5df1d8cbc0c7e
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>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/nand_bbt.c