Skip to contentSkip to conversation

gpio: kempld: Fix autoloading of module

PATCH In review Axel Lin 3 participants 4 messages Apr 12, 2014 – Apr 22, 2014 GPIO

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 gpio: kempld: Fix autoloading of module

Make the module alias match the platform device name, so gpio-kempld module should now autoload correctly.

---
 drivers/gpio/gpio-kempld.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-kempld.c +1 -1
index c6d8817..ebe1023 100644
@@ -216,4 +216,4 @@ module_platform_driver(kempld_gpio_driver);
 MODULE_DESCRIPTION("KEM PLD GPIO Driver");
 MODULE_AUTHOR("Michael Brunner <[email protected]>");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:gpio-kempld");
+MODULE_ALIAS("platform:kempld-gpio");
Signature · 1 line
1.8.3.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Axel Lin

Make the module alias match the platform device name, so gpio-kempld module should now autoload correctly.

---
  drivers/gpio/gpio-kempld.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-kempld.c +0 -0
index c6d8817..ebe1023 100644

drivers/gpio/gpio-kempld.c module_platform_driver(kempld_gpio_driver); · line 219

Quoted 5 lines
drivers/gpio/gpio-kempld.c +1 -1
@@ -216,4 +216,4 @@ module_platform_driver(kempld_gpio_driver);
  MODULE_DESCRIPTION("KEM PLD GPIO Driver");
  MODULE_AUTHOR("Michael Brunner <[email protected]>");
  MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:gpio-kempld");
+MODULE_ALIAS("platform:kempld-gpio");

Wonder though if the module alias is necessary in the first place, as the driver is instantiated from the mfd driver.

Guenter

author
#2 lore raw

2014-04-13 0:58 GMT+08:00 Guenter Roeck <[email protected]>:

Quoted 25 lines · Axel Lin
Quoted 16 lines

Make the module alias match the platform device name, so gpio-kempld module
should now autoload correctly.

---
  drivers/gpio/gpio-kempld.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-kempld.c +0 -0
index c6d8817..ebe1023 100644

drivers/gpio/gpio-kempld.c module_platform_driver(kempld_gpio_driver); · line 219

Quoted 5 lines
drivers/gpio/gpio-kempld.c +1 -1
@@ -216,4 +216,4 @@ module_platform_driver(kempld_gpio_driver);
  MODULE_DESCRIPTION("KEM PLD GPIO Driver");
  MODULE_AUTHOR("Michael Brunner <[email protected]>");
  MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:gpio-kempld");
+MODULE_ALIAS("platform:kempld-gpio");
Quoted 2 lines

Wonder though if the module alias is necessary in the first place, as the driver is instantiated from the mfd driver.

The mfd driver calls mfd_add_devices() to add kempld-gpio device. In the case if kempld-gpio driver is built as a module and not yet be loaded to the system, the module alias is required to make module autoloading work.

Regards,
Axel