mtd: physmap_of: fixup gemini/versatile dependencies
authorBrian Norris <computersforpeace@gmail.com>
Thu, 9 Feb 2017 02:09:37 +0000 (18:09 -0800)
committerBrian Norris <computersforpeace@gmail.com>
Fri, 10 Feb 2017 17:53:41 +0000 (09:53 -0800)
physmap_of sort of depends on the gemini and versatile modules (when
they're enabled), but this isn't expressed in Kconfig. Let's just merge
the modules all together, when enabled. Then we can avoid exporting a
few symbols, and the versatile and gemini code can now be modular again
(the below commit accidentally made them built-in only).

Resolves errors like this:

ERROR: "of_flash_probe_versatile" [drivers/mtd/maps/physmap_of.ko] undefined!
ERROR: "of_flash_probe_gemini" [drivers/mtd/maps/physmap_of.ko] undefined!

Fixes: 56ff337ea433 ("mtd: physmap_of: add a hook for Gemini flash probing")
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
drivers/mtd/maps/Makefile
drivers/mtd/maps/physmap_of_gemini.c
drivers/mtd/maps/physmap_of_versatile.c

index 2fec1e0c2371939d09fe966214925c435ec72bfa..aef1846b4de24321ca7cc65122d5cb14c1a00b6e 100644 (file)
@@ -17,9 +17,13 @@ obj-$(CONFIG_MTD_CK804XROM)  += ck804xrom.o
 obj-$(CONFIG_MTD_TSUNAMI)      += tsunami_flash.o
 obj-$(CONFIG_MTD_PXA2XX)       += pxa2xx-flash.o
 obj-$(CONFIG_MTD_PHYSMAP)      += physmap.o
+ifdef CONFIG_MTD_PHYSMAP_OF_VERSATILE
+physmap_of-objs += physmap_of_versatile.o
+endif
+ifdef CONFIG_MTD_PHYSMAP_OF_GEMINI
+physmap_of-objs += physmap_of_gemini.o
+endif
 obj-$(CONFIG_MTD_PHYSMAP_OF)   += physmap_of.o
-obj-$(CONFIG_MTD_PHYSMAP_OF_VERSATILE) += physmap_of_versatile.o
-obj-$(CONFIG_MTD_PHYSMAP_OF_GEMINI)    += physmap_of_gemini.o
 obj-$(CONFIG_MTD_PISMO)                += pismo.o
 obj-$(CONFIG_MTD_PMC_MSP_EVM)   += pmcmsp-flash.o
 obj-$(CONFIG_MTD_PCMCIA)       += pcmciamtd.o
index e99db772143b8c1ca4ec0e6dd67582207e97c7d7..9d371cd728ea122e47000139f35b451dd84df032 100644 (file)
@@ -115,4 +115,3 @@ int of_flash_probe_gemini(struct platform_device *pdev,
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(of_flash_probe_gemini);
index 0f39b2a015f403f30046256815429c1c1406ec7f..8c6ccded9be8020db4688bc0654c50aa2301e00f 100644 (file)
@@ -252,4 +252,3 @@ int of_flash_probe_versatile(struct platform_device *pdev,
 
        return 0;
 }
-EXPORT_SYMBOL_GPL(of_flash_probe_versatile);