From d463c6ff88108d187c73396280f5dae8b4a78e65 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 27 Nov 2013 15:46:06 +0100 Subject: 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: Jean Delvare Cc: Mathias Nyman Cc: Linus Walleij Acked-by: Mika Westerberg Signed-off-by: Linus Walleij --- drivers/gpio/gpio-lynxpoint.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers/gpio/gpio-lynxpoint.c') diff --git a/drivers/gpio/gpio-lynxpoint.c b/drivers/gpio/gpio-lynxpoint.c index 89867ed7bd50..1a7443ee6016 100644 --- a/drivers/gpio/gpio-lynxpoint.c +++ b/drivers/gpio/gpio-lynxpoint.c @@ -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"); -- cgit v1.2.3