summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2016-10-17 17:44:12 +0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-16 16:21:05 +0100
commit2411434a2b78b38f70b3447d46b9c7db4f20fe54 (patch)
tree6db0504eb62a1d7e69c30500858d8f1ed929dcd3
parent[media] s5p-cec: Fix module autoload (diff)
downloadlinux-2411434a2b78b38f70b3447d46b9c7db4f20fe54.tar.xz
linux-2411434a2b78b38f70b3447d46b9c7db4f20fe54.zip
[media] st-cec: Fix module autoload
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> Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r--drivers/staging/media/st-cec/stih-cec.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/media/st-cec/stih-cec.c b/drivers/staging/media/st-cec/stih-cec.c
index b0aee1d4d5d0..1f1542e8154f 100644
--- a/drivers/staging/media/st-cec/stih-cec.c
+++ b/drivers/staging/media/st-cec/stih-cec.c
@@ -362,6 +362,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,