Commit 3184c3bf authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Mauro Carvalho Chehab

[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: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 62de7d99
...@@ -770,6 +770,7 @@ static const struct of_device_id vsp1_of_match[] = { ...@@ -770,6 +770,7 @@ static const struct of_device_id vsp1_of_match[] = {
{ .compatible = "renesas,vsp2" }, { .compatible = "renesas,vsp2" },
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, vsp1_of_match);
static struct platform_driver vsp1_platform_driver = { static struct platform_driver vsp1_platform_driver = {
.probe = vsp1_probe, .probe = vsp1_probe,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment