| From 985814f123c53bdbbdc4e2400a332863710460c2 Mon Sep 17 00:00:00 2001 |
| From: Javier Martinez Canillas <javier@osg.samsung.com> |
| Date: Mon, 17 Oct 2016 13:44:09 -0200 |
| Subject: [PATCH 057/299] [media] v4l: rcar-fcp: Fix module autoload for OF |
| registration |
| |
| 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> |
| Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> |
| Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> |
| (cherry picked from commit d6023d33a4ac9bc53975c9029a59135d71a76268) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/media/platform/rcar-fcp.c | 1 + |
| 1 file changed, 1 insertion(+) |
| |
| --- 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_fc |
| { .compatible = "renesas,fcpv" }, |
| { }, |
| }; |
| +MODULE_DEVICE_TABLE(of, rcar_fcp_of_match); |
| |
| static struct platform_driver rcar_fcp_platform_driver = { |
| .probe = rcar_fcp_probe, |