gpio-lynxpoint: Allow building as a module
authorJean Delvare <jdelvare@suse.de>
Wed, 27 Nov 2013 14:46:06 +0000 (15:46 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 3 Dec 2013 10:26:07 +0000 (11:26 +0100)
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>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/Kconfig
drivers/gpio/gpio-lynxpoint.c

index 0f0444475bf065e9bc90e9d72ad26fac284ec9f9..58d98dd9e4b9c79d69a5c0342e1155421bc1b4d2 100644 (file)
@@ -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
index 89867ed7bd50b7ddd79c5750ca8b52437804fef8..1a7443ee60160212b552bce7ad84eab88e0bc416 100644 (file)
@@ -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");
This page took 0.031126 seconds and 5 git commands to generate.