summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/scpi-hwmon.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javier@osg.samsung.com>2016-11-07 21:31:44 +0100
committerGuenter Roeck <linux@roeck-us.net>2016-12-02 22:28:02 +0100
commit13edb767aa609b6efb7c0c2b57fbd72a6ded0eed (patch)
tree02adb2586eaa1175bec38fa853f8efdeb637188b /drivers/hwmon/scpi-hwmon.c
parentLinux 4.9-rc7 (diff)
downloadlinux-13edb767aa609b6efb7c0c2b57fbd72a6ded0eed.tar.xz
linux-13edb767aa609b6efb7c0c2b57fbd72a6ded0eed.zip
hwmon: (scpi) 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/hwmon/scpi-hwmon.ko | grep alias $ After this patch: $ modinfo drivers/hwmon/scpi-hwmon.ko | grep alias alias: of:N*T*Carm,scpi-sensorsC* alias: of:N*T*Carm,scpi-sensors Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Fixes: ea98b29a05e9c ("hwmon: Support sensors exported via ARM SCP interface") Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/scpi-hwmon.c')
-rw-r--r--drivers/hwmon/scpi-hwmon.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/hwmon/scpi-hwmon.c b/drivers/hwmon/scpi-hwmon.c
index 559a3dcd64d8..094f948f99ff 100644
--- a/drivers/hwmon/scpi-hwmon.c
+++ b/drivers/hwmon/scpi-hwmon.c
@@ -251,6 +251,7 @@ static const struct of_device_id scpi_of_match[] = {
{.compatible = "arm,scpi-sensors"},
{},
};
+MODULE_DEVICE_TABLE(of, scpi_of_match);
static struct platform_driver scpi_hwmon_platdrv = {
.driver = {