Commit d463c6ff authored by Jean Delvare's avatar Jean Delvare Committed by Linus Walleij

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.
Signed-off-by: default avatarJean Delvare <jdelvare@suse.de>
Cc: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 45ad4f7d
...@@ -353,7 +353,7 @@ config GPIO_GE_FPGA ...@@ -353,7 +353,7 @@ config GPIO_GE_FPGA
board computers. board computers.
config GPIO_LYNXPOINT config GPIO_LYNXPOINT
bool "Intel Lynxpoint GPIO support" tristate "Intel Lynxpoint GPIO support"
depends on ACPI && X86 depends on ACPI && X86
select IRQ_DOMAIN select IRQ_DOMAIN
help help
......
...@@ -469,4 +469,15 @@ static int __init lp_gpio_init(void) ...@@ -469,4 +469,15 @@ static int __init lp_gpio_init(void)
return platform_driver_register(&lp_gpio_driver); 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); 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");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment