pinctrl: baytrail: add missing module removal support
authorFelipe Balbi <balbi@ti.com>
Mon, 13 Oct 2014 20:50:08 +0000 (15:50 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 28 Oct 2014 15:59:30 +0000 (16:59 +0100)
pinctrl-baytrail driver provides a proper ->remove()
method on its platform_driver definition, however there's
no way, currently, to unload the driver due to missing
module_exit(). This patch adds module_exit().

Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-baytrail.c

index e12e5b0..3ece001 100644 (file)
@@ -612,5 +612,10 @@ static int __init byt_gpio_init(void)
 {
        return platform_driver_register(&byt_gpio_driver);
 }
-
 subsys_initcall(byt_gpio_init);
+
+static void __exit byt_gpio_exit(void)
+{
+       platform_driver_unregister(&byt_gpio_driver);
+}
+module_exit(byt_gpio_exit);