net/wireless/ti/wlcore/spi: Use module_spi_driver to register driver
authorPeter Huewe <peterhuewe@gmx.de>
Mon, 20 May 2013 19:52:40 +0000 (21:52 +0200)
committerLuciano Coelho <coelho@ti.com>
Mon, 17 Jun 2013 09:20:49 +0000 (12:20 +0300)
Removing some boilerplate by using module_spi_driver instead of calling
register and unregister in the otherwise empty init/exit functions

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wlcore/spi.c

index e26447832683254fe26c417453bae702c1e1d1d1..1b0cd98e35f187f8be9f0525e152e5960742471d 100644 (file)
@@ -434,19 +434,7 @@ static struct spi_driver wl1271_spi_driver = {
        .remove         = wl1271_remove,
 };
 
-static int __init wl1271_init(void)
-{
-       return spi_register_driver(&wl1271_spi_driver);
-}
-
-static void __exit wl1271_exit(void)
-{
-       spi_unregister_driver(&wl1271_spi_driver);
-}
-
-module_init(wl1271_init);
-module_exit(wl1271_exit);
-
+module_spi_driver(wl1271_spi_driver);
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Luciano Coelho <coelho@ti.com>");
 MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@nokia.com>");