summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/Kconfig
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-12-19 10:35:44 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-12-19 12:06:49 +0100
commit790266c24de9582b56872ef5ee869442fbb76fa5 (patch)
tree3f9f0fb12bf3eeea07c707a547eede7de91c3e3f /drivers/mtd/nand/Kconfig
parent07fc87d530519360b1f9c7ec7ac7d834b4c48525 (diff)
downloadbarebox-790266c24de9582b56872ef5ee869442fbb76fa5.tar.gz
barebox-790266c24de9582b56872ef5ee869442fbb76fa5.tar.xz
mtd nand: fix oob compile time option
The NAND_READ_OOB Kconfig option is used to a) creating a cdev for reading OOB data b) compiling in mtd->read_oob support The former was intended and that's also what the Kconfig help says. The latter though was implicit and wrong. mtd->read_oob is also used by the bbt code which resulted in a NULL pointer deref when compiled with BBT but without NAND_READ_OOB. To fix this, split the option into two. The now invisible option NAND_OOB_DEVICE is only responsible for b) and gets selected when necessary. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/nand/Kconfig')
-rw-r--r--drivers/mtd/nand/Kconfig7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 20f9f33713..1cc29a8eca 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -41,16 +41,21 @@ config NAND_INFO
Show informational strings about the vendor and nand flash type
during startup
+config NAND_READ_OOB
+ bool
+
config NAND_BBT
bool
+ select NAND_READ_OOB
default y
prompt "support bad block tables"
help
Say y here to include support for bad block tables. This speeds
up the process of checking for bad blocks
-config NAND_READ_OOB
+config NAND_OOB_DEVICE
bool
+ select NAND_READ_OOB
default y
prompt "create a device for reading the OOB data"