mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Wed Oct 15 23:59:09 PDT 2014
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=e7cd6824fd4105ff164aabc3767f195d1f6e4025
Commit: e7cd6824fd4105ff164aabc3767f195d1f6e4025
Parent: 32f1b7c8352fd33d41bcec3cfb054ccdcfd40a42
Author: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
AuthorDate: Wed Oct 1 14:33:29 2014 +0300
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Mon Oct 6 23:40:07 2014 -0700
mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module
This commit adds a hidden option to build the omap_elm as a module, if
omap2_nand is a module (and similarly in the built-in case).
This fixes the following build error when omap2_nand is chosen built-in,
and omap_elm is chosen as a module:
drivers/built-in.o: In function `omap_nand_probe':
drivers/mtd/nand/omap2.c:2010: undefined reference to `elm_config'
drivers/mtd/nand/omap2.c:1980: undefined reference to `elm_config'
drivers/mtd/nand/omap2.c:1927: undefined reference to `elm_config'
drivers/built-in.o: In function `omap_elm_correct_data':
drivers/mtd/nand/omap2.c:1444: undefined reference to `elm_decode_bch_error_page'
Reported-by: Arnd Bergmann <arnd at arndb.de>
Signed-off-by: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
Signed-off-by: Roger Quadros <rogerq at ti.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/Kconfig | 5 ++++-
drivers/mtd/nand/Makefile | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index f1cf503..1cb4b1b 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -96,7 +96,7 @@ config MTD_NAND_OMAP2
config MTD_NAND_OMAP_BCH
depends on MTD_NAND_OMAP2
- tristate "Support hardware based BCH error correction"
+ bool "Support hardware based BCH error correction"
default n
select BCH
help
@@ -106,6 +106,9 @@ config MTD_NAND_OMAP_BCH
legacy OMAP families like OMAP2xxx, OMAP3xxx do not have ELM engine
so they should not enable this config symbol.
+config MTD_NAND_OMAP_BCH_BUILD
+ def_tristate MTD_NAND_OMAP2 && MTD_NAND_OMAP_BCH
+
config MTD_NAND_IDS
tristate
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index b3237b7..9c847e4 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -27,7 +27,7 @@ obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
obj-$(CONFIG_MTD_NAND_ATMEL) += atmel_nand.o
obj-$(CONFIG_MTD_NAND_GPIO) += gpio.o
obj-$(CONFIG_MTD_NAND_OMAP2) += omap2.o
-obj-$(CONFIG_MTD_NAND_OMAP_BCH) += omap_elm.o
+obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD) += omap_elm.o
obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o
obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o
obj-$(CONFIG_MTD_NAND_TMIO) += tmio_nand.o
More information about the linux-mtd-cvs
mailing list