Re: [PATCH 2/5] [media] v4l: rcar-fcp: Fix module autoload for OF registration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx>

Reviewed-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>

> ---
> 
>  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

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux