mtd: physmap_of: fixup gemini/versatile dependencies

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sun Feb 12 18:59:07 PST 2017


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=4f04f68e1598087a8110e8946bfb321eebe115c9
Commit:     4f04f68e1598087a8110e8946bfb321eebe115c9
Parent:     42e9401bd1467d22c4dc4d2c637347b874e6a80b
Author:     Brian Norris <computersforpeace at gmail.com>
AuthorDate: Wed Feb 8 18:09:37 2017 -0800
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Fri Feb 10 09:53:41 2017 -0800

    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 at linaro.org>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
    Reviewed-by: Linus Walleij <linus.walleij at linaro.org>
---
 drivers/mtd/maps/Makefile               | 8 ++++++--
 drivers/mtd/maps/physmap_of_gemini.c    | 1 -
 drivers/mtd/maps/physmap_of_versatile.c | 1 -
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index 2fec1e0..aef1846 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -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
diff --git a/drivers/mtd/maps/physmap_of_gemini.c b/drivers/mtd/maps/physmap_of_gemini.c
index e99db77..9d371cd 100644
--- a/drivers/mtd/maps/physmap_of_gemini.c
+++ b/drivers/mtd/maps/physmap_of_gemini.c
@@ -115,4 +115,3 @@ int of_flash_probe_gemini(struct platform_device *pdev,
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(of_flash_probe_gemini);
diff --git a/drivers/mtd/maps/physmap_of_versatile.c b/drivers/mtd/maps/physmap_of_versatile.c
index 0f39b2a..8c6ccde 100644
--- a/drivers/mtd/maps/physmap_of_versatile.c
+++ b/drivers/mtd/maps/physmap_of_versatile.c
@@ -252,4 +252,3 @@ int of_flash_probe_versatile(struct platform_device *pdev,
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(of_flash_probe_versatile);



More information about the linux-mtd-cvs mailing list