[PATCH] mtd: brcmnand depends on MTD_NAND

From: Arnd Bergmann
Date: Thu Jun 04 2015 - 03:25:59 EST


MTD_NAND_BRCMNAND uses the generic nand functions, but is currently allowed
to be built without CONFIG_MTD_NAND, which results in a link error:

drivers/built-in.o: In function `brcmnand_remove':
coresight-replicator.c:(.text+0x17ae6c): undefined reference to `nand_release'
drivers/built-in.o: In function `brcmnand_probe':
coresight-replicator.c:(.text+0x17d4b4): undefined reference to `nand_scan_ident'
coresight-replicator.c:(.text+0x17d948): undefined reference to `nand_scan_tail'

This adds an explicit Kconfig dependency.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 289664089cf3..4b7e853ce35d 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -393,6 +393,7 @@ config MTD_NAND_GPMI_NAND

config MTD_NAND_BRCMNAND
tristate "Broadcom STB NAND controller"
+ depends on MTD_NAND
depends on ARM || ARM64 || MIPS
help
Enables the Broadcom NAND controller driver. The controller was

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/