]> git.itanic.dy.fi Git - linux-stable/commit
hwmon: (scpi) Fix module autoload
authorJavier Martinez Canillas <javier@osg.samsung.com>
Mon, 7 Nov 2016 20:31:44 +0000 (17:31 -0300)
committerGuenter Roeck <linux@roeck-us.net>
Fri, 2 Dec 2016 21:28:02 +0000 (13:28 -0800)
commit13edb767aa609b6efb7c0c2b57fbd72a6ded0eed
tree02adb2586eaa1175bec38fa853f8efdeb637188b
parente5517c2a5a49ed5e99047008629f1cd60246ea0e
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>
drivers/hwmon/scpi-hwmon.c