Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: physmap_of: fixup gemini/versatile dependencies

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>

+6 -4
+6 -2
drivers/mtd/maps/Makefile
··· 17 17 obj-$(CONFIG_MTD_TSUNAMI) += tsunami_flash.o 18 18 obj-$(CONFIG_MTD_PXA2XX) += pxa2xx-flash.o 19 19 obj-$(CONFIG_MTD_PHYSMAP) += physmap.o 20 + ifdef CONFIG_MTD_PHYSMAP_OF_VERSATILE 21 + physmap_of-objs += physmap_of_versatile.o 22 + endif 23 + ifdef CONFIG_MTD_PHYSMAP_OF_GEMINI 24 + physmap_of-objs += physmap_of_gemini.o 25 + endif 20 26 obj-$(CONFIG_MTD_PHYSMAP_OF) += physmap_of.o 21 - obj-$(CONFIG_MTD_PHYSMAP_OF_VERSATILE) += physmap_of_versatile.o 22 - obj-$(CONFIG_MTD_PHYSMAP_OF_GEMINI) += physmap_of_gemini.o 23 27 obj-$(CONFIG_MTD_PISMO) += pismo.o 24 28 obj-$(CONFIG_MTD_PMC_MSP_EVM) += pmcmsp-flash.o 25 29 obj-$(CONFIG_MTD_PCMCIA) += pcmciamtd.o
-1
drivers/mtd/maps/physmap_of_gemini.c
··· 115 115 116 116 return 0; 117 117 } 118 - EXPORT_SYMBOL_GPL(of_flash_probe_gemini);
-1
drivers/mtd/maps/physmap_of_versatile.c
··· 252 252 253 253 return 0; 254 254 } 255 - EXPORT_SYMBOL_GPL(of_flash_probe_versatile);