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

video: ARM CLCD: export symbols for driver module

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>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Arnd Bergmann and committed by
Tomi Valkeinen
ffe439d6 9986908d

+3 -1
+2
drivers/video/fbdev/amba-clcd-nomadik.c
··· 231 231 /* Unknown panel, fall through */ 232 232 return 0; 233 233 } 234 + EXPORT_SYMBOL_GPL(nomadik_clcd_init_panel); 234 235 235 236 #define PMU_CTRL_OFFSET 0x0000 236 237 #define PMU_CTRL_LCDNDIF BIT(26) ··· 256 255 257 256 return 0; 258 257 } 258 + EXPORT_SYMBOL_GPL(nomadik_clcd_init_board);
+1 -1
drivers/video/fbdev/amba-clcd-versatile.c
··· 571 571 572 572 return 0; 573 573 } 574 - 574 + EXPORT_SYMBOL_GPL(versatile_clcd_init_panel); 575 575 #endif