* [PATCH] video: exynos: fix modular build
@ 2015-05-19 12:17 Arnd Bergmann
2015-05-20 1:14 ` Krzysztof Kozlowski
2015-05-20 7:05 ` Paul Bolle
0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2015-05-19 12:17 UTC (permalink / raw)
To: linux-fbdev
Cc: linux-arm-kernel, linux-kernel, linux-samsung-soc,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Kukjin Kim,
Krzysztof Kozlowski, Inki Dae, Donghwa Lee, Kyungmin Park
The s6e8ax0 driver has a dependency on BACKLIGHT_CLASS_DEVICE,
which can be configured as a loadable module, so we have to
make the driver a tristate symbol as well, to avoid this error:
drivers/built-in.o: In function `s6e8ax0_probe':
:(.text+0x23a48): undefined reference to `devm_backlight_device_register'
This also means we get another error from a missing export, which
this fixes as well:
ERROR: "exynos_mipi_dsi_register_lcd_driver" [drivers/video/fbdev/exynos/s6e8ax0.ko] undefined!
Finally, the EXYNOS_VIDEO option is turned into tristate as well
for good measure, as all framebuffer drivers should be configurable
as modules.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
diff --git a/drivers/video/fbdev/exynos/Kconfig b/drivers/video/fbdev/exynos/Kconfig
index 1f16b4678c71..d916bef94f25 100644
--- a/drivers/video/fbdev/exynos/Kconfig
+++ b/drivers/video/fbdev/exynos/Kconfig
@@ -3,7 +3,7 @@
#
menuconfig EXYNOS_VIDEO
- bool "Exynos Video driver support"
+ tristate "Exynos Video driver support"
depends on ARCH_S5PV210 || ARCH_EXYNOS
help
This enables support for EXYNOS Video device.
@@ -15,13 +15,13 @@ if EXYNOS_VIDEO
#
config EXYNOS_MIPI_DSI
- bool "EXYNOS MIPI DSI driver support."
+ tristate "EXYNOS MIPI DSI driver support."
select GENERIC_PHY
help
This enables support for MIPI-DSI device.
config EXYNOS_LCD_S6E8AX0
- bool "S6E8AX0 MIPI AMOLED LCD Driver"
+ tristate "S6E8AX0 MIPI AMOLED LCD Driver"
depends on EXYNOS_MIPI_DSI && BACKLIGHT_CLASS_DEVICE
depends on (LCD_CLASS_DEVICE = y)
default n
diff --git a/drivers/video/fbdev/exynos/Makefile b/drivers/video/fbdev/exynos/Makefile
index b5b1bd228abb..02d8dc522fea 100644
--- a/drivers/video/fbdev/exynos/Makefile
+++ b/drivers/video/fbdev/exynos/Makefile
@@ -2,6 +2,8 @@
# Makefile for the exynos video drivers.
#
-obj-$(CONFIG_EXYNOS_MIPI_DSI) += exynos_mipi_dsi.o exynos_mipi_dsi_common.o \
- exynos_mipi_dsi_lowlevel.o
+obj-$(CONFIG_EXYNOS_MIPI_DSI) += exynos-mipi-dsi-mod.o
+
+exynos-mipi-dsi-mod-objs += exynos_mipi_dsi.o exynos_mipi_dsi_common.o \
+ exynos_mipi_dsi_lowlevel.o
obj-$(CONFIG_EXYNOS_LCD_S6E8AX0) += s6e8ax0.o
diff --git a/drivers/video/fbdev/exynos/exynos_mipi_dsi.c b/drivers/video/fbdev/exynos/exynos_mipi_dsi.c
index b527fe464628..18edc724bf57 100644
--- a/drivers/video/fbdev/exynos/exynos_mipi_dsi.c
+++ b/drivers/video/fbdev/exynos/exynos_mipi_dsi.c
@@ -263,6 +263,7 @@ int exynos_mipi_dsi_register_lcd_driver(struct mipi_dsim_lcd_driver *lcd_drv)
return 0;
}
+EXPORT_SYMBOL_GPL(exynos_mipi_dsi_register_lcd_driver);
static struct mipi_dsim_ddi *exynos_mipi_dsi_bind_lcd_ddi(
struct mipi_dsim_device *dsim,
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] video: exynos: fix modular build
2015-05-19 12:17 [PATCH] video: exynos: fix modular build Arnd Bergmann
@ 2015-05-20 1:14 ` Krzysztof Kozlowski
2015-05-20 7:05 ` Paul Bolle
1 sibling, 0 replies; 3+ messages in thread
From: Krzysztof Kozlowski @ 2015-05-20 1:14 UTC (permalink / raw)
To: Arnd Bergmann, linux-fbdev
Cc: linux-arm-kernel, linux-kernel, linux-samsung-soc,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Kukjin Kim,
Inki Dae, Donghwa Lee, Kyungmin Park
On 19.05.2015 21:17, Arnd Bergmann wrote:
> The s6e8ax0 driver has a dependency on BACKLIGHT_CLASS_DEVICE,
> which can be configured as a loadable module, so we have to
> make the driver a tristate symbol as well, to avoid this error:
>
> drivers/built-in.o: In function `s6e8ax0_probe':
> :(.text+0x23a48): undefined reference to `devm_backlight_device_register'
>
> This also means we get another error from a missing export, which
> this fixes as well:
>
> ERROR: "exynos_mipi_dsi_register_lcd_driver" [drivers/video/fbdev/exynos/s6e8ax0.ko] undefined!
>
> Finally, the EXYNOS_VIDEO option is turned into tristate as well
> for good measure, as all framebuffer drivers should be configurable
> as modules.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Looks good:
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] video: exynos: fix modular build
2015-05-19 12:17 [PATCH] video: exynos: fix modular build Arnd Bergmann
2015-05-20 1:14 ` Krzysztof Kozlowski
@ 2015-05-20 7:05 ` Paul Bolle
1 sibling, 0 replies; 3+ messages in thread
From: Paul Bolle @ 2015-05-20 7:05 UTC (permalink / raw)
To: Arnd Bergmann
Cc: linux-fbdev, linux-arm-kernel, linux-kernel, linux-samsung-soc,
Jean-Christophe Plagniol-Villard, Tomi Valkeinen, Kukjin Kim,
Krzysztof Kozlowski, Inki Dae, Donghwa Lee, Kyungmin Park
On Tue, 2015-05-19 at 14:17 +0200, Arnd Bergmann wrote:
> Finally, the EXYNOS_VIDEO option is turned into tristate as well
> for good measure, as all framebuffer drivers should be configurable
> as modules.
EXYNOS_MIPI_DSI and EXYNOS_LCD_S6E8AX0 are made tristate too. And that
is, I think, what counts. See below.
For anyone wondering how these two drivers can be made modular with only
a few tweaks to the build system: that is because exynos_mipi_dsi.c and
s6e8ax0.c already contain module specific boilerplate. They probably
already contained that boilerplate when they were added three years ago.
(Perhaps the changelog should mention this.)
> --- a/drivers/video/fbdev/exynos/Kconfig
> +++ b/drivers/video/fbdev/exynos/Kconfig
> menuconfig EXYNOS_VIDEO
> - bool "Exynos Video driver support"
> + tristate "Exynos Video driver support"
> depends on ARCH_S5PV210 || ARCH_EXYNOS
> help
> This enables support for EXYNOS Video device.
I have tested this only lightly but I do think this hunk is not needed.
Because basically all that this entry does is making EXYNOS_MIPI_DSI and
EXYNOS_LCD_S6E8AX0 available. And that works just as well if it's a
bool. Correct?
> config EXYNOS_MIPI_DSI
> - bool "EXYNOS MIPI DSI driver support."
> + tristate "EXYNOS MIPI DSI driver support."
> select GENERIC_PHY
> help
> This enables support for MIPI-DSI device.
>
> config EXYNOS_LCD_S6E8AX0
> - bool "S6E8AX0 MIPI AMOLED LCD Driver"
> + tristate "S6E8AX0 MIPI AMOLED LCD Driver"
> depends on EXYNOS_MIPI_DSI && BACKLIGHT_CLASS_DEVICE
> depends on (LCD_CLASS_DEVICE = y)
> default n
> --- a/drivers/video/fbdev/exynos/Makefile
> +++ b/drivers/video/fbdev/exynos/Makefile
> -obj-$(CONFIG_EXYNOS_MIPI_DSI) += exynos_mipi_dsi.o exynos_mipi_dsi_common.o \
> - exynos_mipi_dsi_lowlevel.o
> +obj-$(CONFIG_EXYNOS_MIPI_DSI) += exynos-mipi-dsi-mod.o
> +
> +exynos-mipi-dsi-mod-objs += exynos_mipi_dsi.o exynos_mipi_dsi_common.o \
> + exynos_mipi_dsi_lowlevel.o
I don't speak Makefilese fluently, so I have to ask. Is the -mod
extension needed because a module built from multiple files can't have a
name that matches the name of one of its .c files (minus the .c
extension, of course)?
> obj-$(CONFIG_EXYNOS_LCD_S6E8AX0) += s6e8ax0.o
Thanks,
Paul Bolle
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-20 7:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-19 12:17 [PATCH] video: exynos: fix modular build Arnd Bergmann
2015-05-20 1:14 ` Krzysztof Kozlowski
2015-05-20 7:05 ` Paul Bolle
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).