Skip to contentSkip to conversation

gpio-lynxpoint: Allow building as a module

PATCH In review Jean Delvare 3 participants 4 messages Nov 27, 2013 – Nov 29, 2013 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 gpio-lynxpoint: Allow building as a module

Change CONFIG_GPIO_LYNXPOINT from bool to tristate so that the gpio-lynxpoint driver can be built as a module.

Add the required glue: an exit function to unregister the driver, and module information.

Cc Mathias Nyman <[email protected]>
Cc Linus Walleij <[email protected]>
---
 drivers/gpio/Kconfig          |    2 +-
 drivers/gpio/gpio-lynxpoint.c |   11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)
drivers/gpio/Kconfig +1 -1
@@ -353,7 +353,7 @@ config GPIO_GE_FPGA
 	  board computers.
 
 config GPIO_LYNXPOINT
-	bool "Intel Lynxpoint GPIO support"
+	tristate "Intel Lynxpoint GPIO support"
 	depends on ACPI && X86
 	select IRQ_DOMAIN
 	help
drivers/gpio/gpio-lynxpoint.c +11 -0
@@ -469,4 +469,15 @@ static int __init lp_gpio_init(void)
 	return platform_driver_register(&lp_gpio_driver);
 }
 
+static void __exit lp_gpio_exit(void)
+{
+	platform_driver_unregister(&lp_gpio_driver);
+}
+
 subsys_initcall(lp_gpio_init);
+module_exit(lp_gpio_exit);
+
+MODULE_AUTHOR("Mathias Nyman (Intel)");
+MODULE_DESCRIPTION("GPIO interface for Intel Lynxpoint");
+MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:lp_gpio");
Signature · 2 lines
Jean Delvare
Suse L3 Support
#1 lore raw
Quoted 9 lines · Jean Delvare

Change CONFIG_GPIO_LYNXPOINT from bool to tristate so that the gpio-lynxpoint driver can be built as a module.

Add the required glue: an exit function to unregister the driver, and module information.

Cc Mathias Nyman <[email protected]>
Cc Linus Walleij <[email protected]>

Hm I think Mika is working on this driver now, Mika can you have a look at this patch?

Yours,
Linus Walleij

#2 lore raw
Quoted 8 lines · Linus Walleij
Quoted 6 lines · Jean Delvare

Change CONFIG_GPIO_LYNXPOINT from bool to tristate so that the gpio-lynxpoint driver can be built as a module.

Add the required glue: an exit function to unregister the driver, and module information.

Quoted 6 lines
Quoted 3 lines
Cc Mathias Nyman <[email protected]>
Cc Linus Walleij <[email protected]>

Hm I think Mika is working on this driver now, Mika can you have a look at this patch?

I don't have any objections in merging this patch. It looks good and I can't remember any reasons why it can't be compiled as a module :)