linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: ARM CLCD: export symbols for driver module
@ 2016-08-26 15:34 Arnd Bergmann
  2016-08-29 13:20 ` Linus Walleij
  2016-08-30  8:55 ` Tomi Valkeinen
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2016-08-26 15:34 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Russell King, Arnd Bergmann, Jean-Christophe Plagniol-Villard,
	Linus Walleij, linux-fbdev, linux-kernel

The amba-clcd-versatile.c code is always built-in and has to
be done that way because it gets called by platform code that is
also built-in. However, it now also gets called from the
core CLCD driver through the .init_panel callback function,
which leads to a build error when the framebuffer is configured
as a loadable module:

ERROR: "versatile_clcd_init_panel" [drivers/video/fbdev/amba-clcd-mod.ko] undefined!

The same thing happens for the nomadik driver, although that
could be linked into the core module if we want to:

ERROR: "nomadik_clcd_init_panel" [drivers/video/fbdev/amba-clcd.ko] undefined!
ERROR: "nomadik_clcd_init_board" [drivers/video/fbdev/amba-clcd.ko] undefined!

For consistency, I'm taking the same approach in both cases here
and just export the functions to make them usable by the driver.

Alternatively, we could split out the CONFIG_OF-code from amba-clcd-versatile.c
into a new file and link those two together with the core driver as one
module.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 1d3f0cbe0d3a ("video: ARM CLCD: add special board and panel hooks for Nomadik")
Fixes: 25348160e9a4 ("video: ARM CLCD: add special panel hook for Versatiles")
---
 drivers/video/fbdev/amba-clcd-nomadik.c   | 2 ++
 drivers/video/fbdev/amba-clcd-versatile.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/amba-clcd-nomadik.c b/drivers/video/fbdev/amba-clcd-nomadik.c
index 243167c8ee15..0c06fcaaa6e8 100644
--- a/drivers/video/fbdev/amba-clcd-nomadik.c
+++ b/drivers/video/fbdev/amba-clcd-nomadik.c
@@ -231,6 +231,7 @@ int nomadik_clcd_init_panel(struct clcd_fb *fb,
 	/* Unknown panel, fall through */
 	return 0;
 }
+EXPORT_SYMBOL_GPL(nomadik_clcd_init_panel);
 
 #define PMU_CTRL_OFFSET 0x0000
 #define PMU_CTRL_LCDNDIF BIT(26)
@@ -255,3 +256,4 @@ int nomadik_clcd_init_board(struct amba_device *adev,
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(nomadik_clcd_init_board);
diff --git a/drivers/video/fbdev/amba-clcd-versatile.c b/drivers/video/fbdev/amba-clcd-versatile.c
index 9a90817b1550..dc3c153cad0f 100644
--- a/drivers/video/fbdev/amba-clcd-versatile.c
+++ b/drivers/video/fbdev/amba-clcd-versatile.c
@@ -567,5 +567,5 @@ int versatile_clcd_init_panel(struct clcd_fb *fb,
 
 	return 0;
 }
-
+EXPORT_SYMBOL_GPL(versatile_clcd_init_panel);
 #endif
-- 
2.9.0

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

* Re: [PATCH] video: ARM CLCD: export symbols for driver module
  2016-08-26 15:34 [PATCH] video: ARM CLCD: export symbols for driver module Arnd Bergmann
@ 2016-08-29 13:20 ` Linus Walleij
  2016-08-30  8:55 ` Tomi Valkeinen
  1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2016-08-29 13:20 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Tomi Valkeinen, Russell King, Jean-Christophe Plagniol-Villard,
	linux-fbdev, linux-kernel

On Fri, Aug 26, 2016 at 5:34 PM, Arnd Bergmann <arnd@arndb.de> wrote:

> The amba-clcd-versatile.c code is always built-in and has to
> be done that way because it gets called by platform code that is
> also built-in. However, it now also gets called from the
> core CLCD driver through the .init_panel callback function,
> which leads to a build error when the framebuffer is configured
> as a loadable module:
>
> ERROR: "versatile_clcd_init_panel" [drivers/video/fbdev/amba-clcd-mod.ko] undefined!
>
> The same thing happens for the nomadik driver, although that
> could be linked into the core module if we want to:
>
> ERROR: "nomadik_clcd_init_panel" [drivers/video/fbdev/amba-clcd.ko] undefined!
> ERROR: "nomadik_clcd_init_board" [drivers/video/fbdev/amba-clcd.ko] undefined!
>
> For consistency, I'm taking the same approach in both cases here
> and just export the functions to make them usable by the driver.
>
> Alternatively, we could split out the CONFIG_OF-code from amba-clcd-versatile.c
> into a new file and link those two together with the core driver as one
> module.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 1d3f0cbe0d3a ("video: ARM CLCD: add special board and panel hooks for Nomadik")
> Fixes: 25348160e9a4 ("video: ARM CLCD: add special panel hook for Versatiles")

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH] video: ARM CLCD: export symbols for driver module
  2016-08-26 15:34 [PATCH] video: ARM CLCD: export symbols for driver module Arnd Bergmann
  2016-08-29 13:20 ` Linus Walleij
@ 2016-08-30  8:55 ` Tomi Valkeinen
  1 sibling, 0 replies; 3+ messages in thread
From: Tomi Valkeinen @ 2016-08-30  8:55 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Russell King, Jean-Christophe Plagniol-Villard, Linus Walleij,
	linux-fbdev, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 1515 bytes --]



On 26/08/16 18:34, Arnd Bergmann wrote:
> The amba-clcd-versatile.c code is always built-in and has to
> be done that way because it gets called by platform code that is
> also built-in. However, it now also gets called from the
> core CLCD driver through the .init_panel callback function,
> which leads to a build error when the framebuffer is configured
> as a loadable module:
> 
> ERROR: "versatile_clcd_init_panel" [drivers/video/fbdev/amba-clcd-mod.ko] undefined!
> 
> The same thing happens for the nomadik driver, although that
> could be linked into the core module if we want to:
> 
> ERROR: "nomadik_clcd_init_panel" [drivers/video/fbdev/amba-clcd.ko] undefined!
> ERROR: "nomadik_clcd_init_board" [drivers/video/fbdev/amba-clcd.ko] undefined!
> 
> For consistency, I'm taking the same approach in both cases here
> and just export the functions to make them usable by the driver.
> 
> Alternatively, we could split out the CONFIG_OF-code from amba-clcd-versatile.c
> into a new file and link those two together with the core driver as one
> module.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: 1d3f0cbe0d3a ("video: ARM CLCD: add special board and panel hooks for Nomadik")
> Fixes: 25348160e9a4 ("video: ARM CLCD: add special panel hook for Versatiles")
> ---
>  drivers/video/fbdev/amba-clcd-nomadik.c   | 2 ++
>  drivers/video/fbdev/amba-clcd-versatile.c | 2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)

Thanks, queued for 4.9.

 Tomi


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2016-08-30  8:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-26 15:34 [PATCH] video: ARM CLCD: export symbols for driver module Arnd Bergmann
2016-08-29 13:20 ` Linus Walleij
2016-08-30  8:55 ` Tomi Valkeinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).