bus: arm-ccn: Fix module autoload
authorJavier Martinez Canillas <javier@osg.samsung.com>
Mon, 2 Jan 2017 13:02:29 +0000 (10:02 -0300)
committerPawel Moll <pawel.moll@arm.com>
Fri, 23 Jun 2017 14:46:35 +0000 (15:46 +0100)
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/bus/arm-ccn.ko | grep alias
$

After this patch:

$ modinfo drivers/bus/arm-ccn.ko | grep alias
alias:          of:N*T*Carm,ccn-504C*
alias:          of:N*T*Carm,ccn-504

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
drivers/bus/arm-ccn.c

index 4d6a2b7..80758f6 100644 (file)
@@ -1547,6 +1547,7 @@ static const struct of_device_id arm_ccn_match[] = {
        { .compatible = "arm,ccn-504", },
        {},
 };
+MODULE_DEVICE_TABLE(of, arm_ccn_match);
 
 static struct platform_driver arm_ccn_driver = {
        .driver = {