]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: ath79: Fix module autoload
authorJavier Martinez Canillas <javier@osg.samsung.com>
Tue, 18 Oct 2016 20:44:01 +0000 (17:44 -0300)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 23 Oct 2016 22:23:05 +0000 (00:23 +0200)
commit091c228e7f331e9dd32faf6b7eaf9c77a8e67283
tree3051695bf3ff8cf52fc0d69165dfd38f21c117a6
parent7b09069922330d914e2cb96e717d4609038a73fd
gpio: ath79: 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/gpio/gpio-ath79.ko | grep alias
$

After this patch:

$ modinfo drivers/gpio/gpio-ath79.ko | grep alias
alias:          of:N*T*Cqca,ar9340-gpioC*
alias:          of:N*T*Cqca,ar9340-gpio
alias:          of:N*T*Cqca,ar7100-gpioC*
alias:          of:N*T*Cqca,ar7100-gpio

Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
Acked-by: Aban Bedel <albeu@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-ath79.c