linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] gpio-lynxpoint: Allow building as a module
@ 2013-11-27 14:46 Jean Delvare
  2013-11-29 10:27 ` Linus Walleij
  2013-11-29 12:40 ` Linus Walleij
  0 siblings, 2 replies; 4+ messages in thread
From: Jean Delvare @ 2013-11-27 14:46 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Mathias Nyman, linux-gpio

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.

Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
---
 drivers/gpio/Kconfig          |    2 +-
 drivers/gpio/gpio-lynxpoint.c |   11 +++++++++++
 2 files changed, 12 insertions(+), 1 deletion(-)

--- linux-3.13-rc1.orig/drivers/gpio/Kconfig	2013-11-27 14:27:39.776405958 +0100
+++ linux-3.13-rc1/drivers/gpio/Kconfig	2013-11-27 14:47:01.604049477 +0100
@@ -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
--- linux-3.13-rc1.orig/drivers/gpio/gpio-lynxpoint.c	2013-11-26 15:44:46.827657836 +0100
+++ linux-3.13-rc1/drivers/gpio/gpio-lynxpoint.c	2013-11-27 15:42:16.563778124 +0100
@@ -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");


-- 
Jean Delvare
Suse L3 Support

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-11-29 12:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-27 14:46 [PATCH v2] gpio-lynxpoint: Allow building as a module Jean Delvare
2013-11-29 10:27 ` Linus Walleij
2013-11-29 11:13   ` Mika Westerberg
2013-11-29 12:40 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).