| From 8a5a9120158f7e426c7a0634fc5c46e1c26b32a6 Mon Sep 17 00:00:00 2001 |
| From: Javier Martinez Canillas <javier@osg.samsung.com> |
| Date: Mon, 17 Oct 2016 13:44:08 -0200 |
| Subject: [PATCH 111/299] [media] v4l: vsp1: 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/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> |
| Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> |
| Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com> |
| (cherry picked from commit 3184c3bf67d1360a303dd02edccab41e37a637bd) |
| Signed-off-by: Simon Horman <horms+renesas@verge.net.au> |
| --- |
| drivers/media/platform/vsp1/vsp1_drv.c | 1 + |
| 1 file changed, 1 insertion(+) |
| |
| --- 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 |
| { .compatible = "renesas,vsp2" }, |
| { }, |
| }; |
| +MODULE_DEVICE_TABLE(of, vsp1_of_match); |
| |
| static struct platform_driver vsp1_platform_driver = { |
| .probe = vsp1_probe, |