Browse Source

net/wireless/ti/wlcore/spi: Use module_spi_driver to register driver

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>
Peter Huewe 12 years ago
parent
commit
d5a49178fa
1 changed files with 1 additions and 13 deletions
  1. 1 13
      drivers/net/wireless/ti/wlcore/spi.c

+ 1 - 13
drivers/net/wireless/ti/wlcore/spi.c

@@ -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>");