* [PATCH 1/5] [media] v4l: vsp1: Fix module autoload for OF registration
2016-10-17 15:44 [PATCH 0/5] [media] Fix module autoload for media platform drivers Javier Martinez Canillas
@ 2016-10-17 15:44 ` Javier Martinez Canillas
2016-10-17 16:08 ` Laurent Pinchart
2016-10-17 15:44 ` [PATCH 2/5] [media] v4l: rcar-fcp: " Javier Martinez Canillas
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 15:44 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Mauro Carvalho Chehab,
linux-renesas-soc, Laurent Pinchart, linux-media
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/media/platform/vsp1/vsp1.ko | grep alias
alias: vsp1
After this patch:
$ modinfo drivers/media/platform/vsp1/vsp1.ko | grep alias
alias: vsp1
alias: of:N*T*Crenesas,vsp2C*
alias: of:N*T*Crenesas,vsp2
alias: of:N*T*Crenesas,vsp1C*
alias: of:N*T*Crenesas,vsp1
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/media/platform/vsp1/vsp1_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
index 57c713a4e1df..aa237b48ad55 100644
--- a/drivers/media/platform/vsp1/vsp1_drv.c
+++ b/drivers/media/platform/vsp1/vsp1_drv.c
@@ -770,6 +770,7 @@ static const struct of_device_id vsp1_of_match[] = {
{ .compatible = "renesas,vsp2" },
{ },
};
+MODULE_DEVICE_TABLE(of, vsp1_of_match);
static struct platform_driver vsp1_platform_driver = {
.probe = vsp1_probe,
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 1/5] [media] v4l: vsp1: Fix module autoload for OF registration
2016-10-17 15:44 ` [PATCH 1/5] [media] v4l: vsp1: Fix module autoload for OF registration Javier Martinez Canillas
@ 2016-10-17 16:08 ` Laurent Pinchart
0 siblings, 0 replies; 10+ messages in thread
From: Laurent Pinchart @ 2016-10-17 16:08 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Mauro Carvalho Chehab, linux-renesas-soc,
linux-media
Hi Javier,
Thank you for the patch.
On Monday 17 Oct 2016 12:44:08 Javier Martinez Canillas wrote:
> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
>
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
>
> Before this patch:
>
> $ modinfo drivers/media/platform/vsp1/vsp1.ko | grep alias
> alias: vsp1
>
> After this patch:
>
> $ modinfo drivers/media/platform/vsp1/vsp1.ko | grep alias
> alias: vsp1
> alias: of:N*T*Crenesas,vsp2C*
> alias: of:N*T*Crenesas,vsp2
> alias: of:N*T*Crenesas,vsp1C*
> alias: of:N*T*Crenesas,vsp1
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>
> drivers/media/platform/vsp1/vsp1_drv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/vsp1/vsp1_drv.c
> b/drivers/media/platform/vsp1/vsp1_drv.c index 57c713a4e1df..aa237b48ad55
> 100644
> --- a/drivers/media/platform/vsp1/vsp1_drv.c
> +++ b/drivers/media/platform/vsp1/vsp1_drv.c
> @@ -770,6 +770,7 @@ static const struct of_device_id vsp1_of_match[] = {
> { .compatible = "renesas,vsp2" },
> { },
> };
> +MODULE_DEVICE_TABLE(of, vsp1_of_match);
>
> static struct platform_driver vsp1_platform_driver = {
> .probe = vsp1_probe,
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/5] [media] v4l: rcar-fcp: Fix module autoload for OF registration
2016-10-17 15:44 [PATCH 0/5] [media] Fix module autoload for media platform drivers Javier Martinez Canillas
2016-10-17 15:44 ` [PATCH 1/5] [media] v4l: vsp1: Fix module autoload for OF registration Javier Martinez Canillas
@ 2016-10-17 15:44 ` Javier Martinez Canillas
2016-10-17 16:08 ` Laurent Pinchart
2016-10-17 15:44 ` [PATCH 3/5] [media] rc: meson-ir: Fix module autoload Javier Martinez Canillas
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 15:44 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Mauro Carvalho Chehab,
linux-renesas-soc, Laurent Pinchart, linux-media
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/media/platform/rcar-fcp.ko | grep alias
alias: rcar-fcp
After this patch:
$ modinfo drivers/media/platform/rcar-fcp.ko | grep alias
alias: rcar-fcp
alias: of:N*T*Crenesas,fcpvC*
alias: of:N*T*Crenesas,fcpv
alias: of:N*T*Crenesas,fcpfC*
alias: of:N*T*Crenesas,fcpf
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/media/platform/rcar-fcp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/platform/rcar-fcp.c b/drivers/media/platform/rcar-fcp.c
index f3a3f31cdfa9..7146fc5ef168 100644
--- a/drivers/media/platform/rcar-fcp.c
+++ b/drivers/media/platform/rcar-fcp.c
@@ -169,6 +169,7 @@ static const struct of_device_id rcar_fcp_of_match[] = {
{ .compatible = "renesas,fcpv" },
{ },
};
+MODULE_DEVICE_TABLE(of, rcar_fcp_of_match);
static struct platform_driver rcar_fcp_platform_driver = {
.probe = rcar_fcp_probe,
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 2/5] [media] v4l: rcar-fcp: Fix module autoload for OF registration
2016-10-17 15:44 ` [PATCH 2/5] [media] v4l: rcar-fcp: " Javier Martinez Canillas
@ 2016-10-17 16:08 ` Laurent Pinchart
0 siblings, 0 replies; 10+ messages in thread
From: Laurent Pinchart @ 2016-10-17 16:08 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: linux-kernel, Mauro Carvalho Chehab, linux-renesas-soc,
linux-media
Hi Javier,
Thank you for the patch.
On Monday 17 Oct 2016 12:44:09 Javier Martinez Canillas wrote:
> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
>
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
>
> Before this patch:
>
> $ modinfo drivers/media/platform/rcar-fcp.ko | grep alias
> alias: rcar-fcp
>
> After this patch:
>
> $ modinfo drivers/media/platform/rcar-fcp.ko | grep alias
> alias: rcar-fcp
> alias: of:N*T*Crenesas,fcpvC*
> alias: of:N*T*Crenesas,fcpv
> alias: of:N*T*Crenesas,fcpfC*
> alias: of:N*T*Crenesas,fcpf
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>
> drivers/media/platform/rcar-fcp.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/media/platform/rcar-fcp.c
> b/drivers/media/platform/rcar-fcp.c index f3a3f31cdfa9..7146fc5ef168 100644
> --- a/drivers/media/platform/rcar-fcp.c
> +++ b/drivers/media/platform/rcar-fcp.c
> @@ -169,6 +169,7 @@ static const struct of_device_id rcar_fcp_of_match[] = {
> { .compatible = "renesas,fcpv" },
> { },
> };
> +MODULE_DEVICE_TABLE(of, rcar_fcp_of_match);
>
> static struct platform_driver rcar_fcp_platform_driver = {
> .probe = rcar_fcp_probe,
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 3/5] [media] rc: meson-ir: Fix module autoload
2016-10-17 15:44 [PATCH 0/5] [media] Fix module autoload for media platform drivers Javier Martinez Canillas
2016-10-17 15:44 ` [PATCH 1/5] [media] v4l: vsp1: Fix module autoload for OF registration Javier Martinez Canillas
2016-10-17 15:44 ` [PATCH 2/5] [media] v4l: rcar-fcp: " Javier Martinez Canillas
@ 2016-10-17 15:44 ` Javier Martinez Canillas
2016-10-17 16:40 ` Kevin Hilman
2016-10-17 15:44 ` [PATCH 4/5] [media] s5p-cec: " Javier Martinez Canillas
2016-10-17 15:44 ` [PATCH 5/5] [media] st-cec: " Javier Martinez Canillas
4 siblings, 1 reply; 10+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 15:44 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Mauro Carvalho Chehab,
Martin Blumenstingl, Kevin Hilman, Neil Armstrong, Carlo Caione,
linux-amlogic, linux-arm-kernel, linux-media
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/media/rc/meson-ir.ko | grep alias
$
After this patch:
$ modinfo drivers/media/rc/meson-ir.ko | grep alias
alias: of:N*T*Camlogic,meson-gxbb-irC*
alias: of:N*T*Camlogic,meson-gxbb-ir
alias: of:N*T*Camlogic,meson8b-irC*
alias: of:N*T*Camlogic,meson8b-ir
alias: of:N*T*Camlogic,meson6-irC*
alias: of:N*T*Camlogic,meson6-ir
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/media/rc/meson-ir.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index 003fff07ade2..7eb3f4f1ddcd 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -218,6 +218,7 @@ static const struct of_device_id meson_ir_match[] = {
{ .compatible = "amlogic,meson-gxbb-ir" },
{ },
};
+MODULE_DEVICE_TABLE(of, meson_ir_match);
static struct platform_driver meson_ir_driver = {
.probe = meson_ir_probe,
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 3/5] [media] rc: meson-ir: Fix module autoload
2016-10-17 15:44 ` [PATCH 3/5] [media] rc: meson-ir: Fix module autoload Javier Martinez Canillas
@ 2016-10-17 16:40 ` Kevin Hilman
0 siblings, 0 replies; 10+ messages in thread
From: Kevin Hilman @ 2016-10-17 16:40 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: lkml, Mauro Carvalho Chehab, Martin Blumenstingl, Neil Armstrong,
Carlo Caione, linux-amlogic, linux-arm-kernel, linux-media
On Mon, Oct 17, 2016 at 8:44 AM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
>
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
>
> Before this patch:
>
> $ modinfo drivers/media/rc/meson-ir.ko | grep alias
> $
>
> After this patch:
>
> $ modinfo drivers/media/rc/meson-ir.ko | grep alias
> alias: of:N*T*Camlogic,meson-gxbb-irC*
> alias: of:N*T*Camlogic,meson-gxbb-ir
> alias: of:N*T*Camlogic,meson8b-irC*
> alias: of:N*T*Camlogic,meson8b-ir
> alias: of:N*T*Camlogic,meson6-irC*
> alias: of:N*T*Camlogic,meson6-ir
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/5] [media] s5p-cec: Fix module autoload
2016-10-17 15:44 [PATCH 0/5] [media] Fix module autoload for media platform drivers Javier Martinez Canillas
` (2 preceding siblings ...)
2016-10-17 15:44 ` [PATCH 3/5] [media] rc: meson-ir: Fix module autoload Javier Martinez Canillas
@ 2016-10-17 15:44 ` Javier Martinez Canillas
2016-10-17 15:44 ` [PATCH 5/5] [media] st-cec: " Javier Martinez Canillas
4 siblings, 0 replies; 10+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 15:44 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Mauro Carvalho Chehab, Marek Szyprowski,
Arnd Bergmann, devel, Sylwester Nawrocki, Kamil Debski,
Greg Kroah-Hartman, Hans Verkuil, linux-media
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/staging/media/s5p-cec/s5p-cec.ko | grep alias
$
After this patch:
$ modinfo drivers/staging/media/s5p-cec/s5p-cec.ko | grep alias
alias: of:N*T*Csamsung,s5p-cecC*
alias: of:N*T*Csamsung,s5p-cec
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/staging/media/s5p-cec/s5p_cec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c
index 1780a08b73c9..4e41f72dbfaa 100644
--- a/drivers/staging/media/s5p-cec/s5p_cec.c
+++ b/drivers/staging/media/s5p-cec/s5p_cec.c
@@ -263,6 +263,7 @@ static const struct of_device_id s5p_cec_match[] = {
},
{},
};
+MODULE_DEVICE_TABLE(of, s5p_cec_match);
static struct platform_driver s5p_cec_pdrv = {
.probe = s5p_cec_probe,
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 5/5] [media] st-cec: Fix module autoload
2016-10-17 15:44 [PATCH 0/5] [media] Fix module autoload for media platform drivers Javier Martinez Canillas
` (3 preceding siblings ...)
2016-10-17 15:44 ` [PATCH 4/5] [media] s5p-cec: " Javier Martinez Canillas
@ 2016-10-17 15:44 ` Javier Martinez Canillas
2016-10-18 7:52 ` Benjamin Gaignard
4 siblings, 1 reply; 10+ messages in thread
From: Javier Martinez Canillas @ 2016-10-17 15:44 UTC (permalink / raw)
To: linux-kernel
Cc: Javier Martinez Canillas, Mauro Carvalho Chehab, devel,
Benjamin Gaignard, kernel, Greg Kroah-Hartman, linux-media
If the driver is built as a module, autoload won't work because the module
alias information is not filled. So user-space can't match the registered
device with the corresponding module.
Export the module alias information using the MODULE_DEVICE_TABLE() macro.
Before this patch:
$ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias
$
After this patch:
$ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias
alias: of:N*T*Cst,stih-cecC*
alias: of:N*T*Cst,stih-cec
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---
drivers/staging/media/st-cec/stih-cec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/media/st-cec/stih-cec.c b/drivers/staging/media/st-cec/stih-cec.c
index 214344866a6b..19d3ff30c8f8 100644
--- a/drivers/staging/media/st-cec/stih-cec.c
+++ b/drivers/staging/media/st-cec/stih-cec.c
@@ -363,6 +363,7 @@ static const struct of_device_id stih_cec_match[] = {
},
{},
};
+MODULE_DEVICE_TABLE(of, stih_cec_match);
static struct platform_driver stih_cec_pdrv = {
.probe = stih_cec_probe,
--
2.7.4
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 5/5] [media] st-cec: Fix module autoload
2016-10-17 15:44 ` [PATCH 5/5] [media] st-cec: " Javier Martinez Canillas
@ 2016-10-18 7:52 ` Benjamin Gaignard
0 siblings, 0 replies; 10+ messages in thread
From: Benjamin Gaignard @ 2016-10-18 7:52 UTC (permalink / raw)
To: Javier Martinez Canillas
Cc: Linux Kernel Mailing List, Mauro Carvalho Chehab, devel, kernel,
Greg Kroah-Hartman, linux-media@vger.kernel.org
Thanks,
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
2016-10-17 17:44 GMT+02:00 Javier Martinez Canillas <javier@osg.samsung.com>:
> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
>
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
>
> Before this patch:
>
> $ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias
> $
>
> After this patch:
>
> $ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias
> alias: of:N*T*Cst,stih-cecC*
> alias: of:N*T*Cst,stih-cec
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>
> ---
>
> drivers/staging/media/st-cec/stih-cec.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/media/st-cec/stih-cec.c b/drivers/staging/media/st-cec/stih-cec.c
> index 214344866a6b..19d3ff30c8f8 100644
> --- a/drivers/staging/media/st-cec/stih-cec.c
> +++ b/drivers/staging/media/st-cec/stih-cec.c
> @@ -363,6 +363,7 @@ static const struct of_device_id stih_cec_match[] = {
> },
> {},
> };
> +MODULE_DEVICE_TABLE(of, stih_cec_match);
>
> static struct platform_driver stih_cec_pdrv = {
> .probe = stih_cec_probe,
> --
> 2.7.4
>
--
Benjamin Gaignard
Graphic Study Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 10+ messages in thread