diff options
author | Jean Delvare <jdelvare@suse.de> | 2013-11-27 09:46:06 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-12-03 05:26:07 -0500 |
commit | d463c6ff88108d187c73396280f5dae8b4a78e65 (patch) | |
tree | fd04510aefc25ed9993aa3f1cd7467c18cd8aa1b /drivers/gpio/gpio-lynxpoint.c | |
parent | 45ad4f7d19a97935256a910c65553724cf6decbd (diff) |
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 <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>
Diffstat (limited to 'drivers/gpio/gpio-lynxpoint.c')
-rw-r--r-- | drivers/gpio/gpio-lynxpoint.c | 11 |
1 files changed, 11 insertions, 0 deletions
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) | |||
469 | return platform_driver_register(&lp_gpio_driver); | 469 | return platform_driver_register(&lp_gpio_driver); |
470 | } | 470 | } |
471 | 471 | ||
472 | static void __exit lp_gpio_exit(void) | ||
473 | { | ||
474 | platform_driver_unregister(&lp_gpio_driver); | ||
475 | } | ||
476 | |||
472 | subsys_initcall(lp_gpio_init); | 477 | subsys_initcall(lp_gpio_init); |
478 | module_exit(lp_gpio_exit); | ||
479 | |||
480 | MODULE_AUTHOR("Mathias Nyman (Intel)"); | ||
481 | MODULE_DESCRIPTION("GPIO interface for Intel Lynxpoint"); | ||
482 | MODULE_LICENSE("GPL"); | ||
483 | MODULE_ALIAS("platform:lp_gpio"); | ||