All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] physmap_of: ensure versatile code is reachable
@ 2016-04-25 23:04 Arnd Bergmann
  2016-04-26 14:02 ` Linus Walleij
  2016-04-27 16:57 ` Brian Norris
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-04-25 23:04 UTC (permalink / raw)
  To: David Woodhouse, Brian Norris, Linus Walleij, Arnd Bergmann
  Cc: linux-mtd, linux-kernel

With the newly added physmap_of_versatile code, we get a build error
when physmap_of is in a module, because of_flash_probe_versatile
is not exported:

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

This adds the export, and changes the Makefile so that the code is
also put into a loadable module rather than built-in when physmap_of
itself is a module.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/mtd/maps/Makefile               | 4 +++-
 drivers/mtd/maps/physmap_of_versatile.c | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/mtd/maps/Makefile b/drivers/mtd/maps/Makefile
index 188873a..644f7d3 100644
--- a/drivers/mtd/maps/Makefile
+++ b/drivers/mtd/maps/Makefile
@@ -18,7 +18,9 @@ obj-$(CONFIG_MTD_TSUNAMI)	+= tsunami_flash.o
 obj-$(CONFIG_MTD_PXA2XX)	+= pxa2xx-flash.o
 obj-$(CONFIG_MTD_PHYSMAP)	+= physmap.o
 obj-$(CONFIG_MTD_PHYSMAP_OF)	+= physmap_of.o
-obj-$(CONFIG_MTD_PHYSMAP_OF_VERSATILE) += physmap_of_versatile.o
+ifdef CONFIG_MTD_PHYSMAP_OF_VERSATILE
+obj-$(CONFIG_MTD_PHYSMAP_OF)	+= physmap_of_versatile.o
+endif
 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_versatile.c b/drivers/mtd/maps/physmap_of_versatile.c
index fa40539..0f39b2a 100644
--- a/drivers/mtd/maps/physmap_of_versatile.c
+++ b/drivers/mtd/maps/physmap_of_versatile.c
@@ -19,6 +19,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  * MA 02111-1307 USA
  */
+#include <linux/export.h>
 #include <linux/io.h>
 #include <linux/of.h>
 #include <linux/of_address.h>
@@ -251,3 +252,4 @@ int of_flash_probe_versatile(struct platform_device *pdev,
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(of_flash_probe_versatile);
-- 
2.7.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] physmap_of: ensure versatile code is reachable
  2016-04-25 23:04 [PATCH] physmap_of: ensure versatile code is reachable Arnd Bergmann
@ 2016-04-26 14:02 ` Linus Walleij
  2016-04-27 16:57 ` Brian Norris
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2016-04-26 14:02 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: David Woodhouse, Brian Norris, linux-mtd, linux-kernel

On Tue, Apr 26, 2016 at 1:04 AM, Arnd Bergmann <arnd@arndb.de> wrote:

> With the newly added physmap_of_versatile code, we get a build error
> when physmap_of is in a module, because of_flash_probe_versatile
> is not exported:
>
> ERROR: "of_flash_probe_versatile" [drivers/mtd/maps/physmap_of.ko] undefined!
>
> This adds the export, and changes the Makefile so that the code is
> also put into a loadable module rather than built-in when physmap_of
> itself is a module.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Argh how stupid of me. Strange I didn't see it on the
build servers. Anyway:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] physmap_of: ensure versatile code is reachable
  2016-04-25 23:04 [PATCH] physmap_of: ensure versatile code is reachable Arnd Bergmann
  2016-04-26 14:02 ` Linus Walleij
@ 2016-04-27 16:57 ` Brian Norris
  1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2016-04-27 16:57 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: David Woodhouse, Linus Walleij, linux-mtd, linux-kernel

On Tue, Apr 26, 2016 at 01:04:38AM +0200, Arnd Bergmann wrote:
> With the newly added physmap_of_versatile code, we get a build error
> when physmap_of is in a module, because of_flash_probe_versatile
> is not exported:
> 
> ERROR: "of_flash_probe_versatile" [drivers/mtd/maps/physmap_of.ko] undefined!
> 
> This adds the export, and changes the Makefile so that the code is
> also put into a loadable module rather than built-in when physmap_of
> itself is a module.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Acked-by: Brian Norris <computersforpeace@gmail.com>

I presume you're taking this in arm-soc.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-04-27 16:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-25 23:04 [PATCH] physmap_of: ensure versatile code is reachable Arnd Bergmann
2016-04-26 14:02 ` Linus Walleij
2016-04-27 16:57 ` Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.