gpio: 74x164: Use module_spi_driver boiler plate function
authorMaxime Ripard <maxime.ripard@free-electrons.com>
Wed, 5 Sep 2012 08:40:50 +0000 (10:40 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 7 Sep 2012 21:00:32 +0000 (23:00 +0200)
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-74x164.c

index a31ad6f..2975036 100644 (file)
@@ -159,18 +159,7 @@ static struct spi_driver gen_74x164_driver = {
        .probe          = gen_74x164_probe,
        .remove         = __devexit_p(gen_74x164_remove),
 };
-
-static int __init gen_74x164_init(void)
-{
-       return spi_register_driver(&gen_74x164_driver);
-}
-subsys_initcall(gen_74x164_init);
-
-static void __exit gen_74x164_exit(void)
-{
-       spi_unregister_driver(&gen_74x164_driver);
-}
-module_exit(gen_74x164_exit);
+module_spi_driver(gen_74x164_driver);
 
 MODULE_AUTHOR("Gabor Juhos <juhosg@openwrt.org>");
 MODULE_AUTHOR("Miguel Gaio <miguel.gaio@efixo.com>");