mtd: nand: Force omap_elm to be built as a module if omap2_nand is a module
authorEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Wed, 1 Oct 2014 11:33:29 +0000 (14:33 +0300)
committerBrian Norris <computersforpeace@gmail.com>
Tue, 7 Oct 2014 06:40:07 +0000 (23:40 -0700)
commite7cd6824fd4105ff164aabc3767f195d1f6e4025
tree72b88e36411fbf306f3e67cc9ad51d648228eec2
parent32f1b7c8352fd33d41bcec3cfb054ccdcfd40a42
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@arndb.de>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/Kconfig
drivers/mtd/nand/Makefile