[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1369079560-6101-1-git-send-email-peterhuewe@gmx.de>
Date: Mon, 20 May 2013 21:52:40 +0200
From: Peter Huewe <peterhuewe@....de>
To: Luciano Coelho <coelho@...com>
Cc: "John W. Linville" <linville@...driver.com>,
Felipe Balbi <balbi@...com>, Ido Yariv <ido@...ery.com>,
Arik Nemtsov <arik@...ery.com>, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Peter Huewe <peterhuewe@....de>
Subject: [PATCH] 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@....de>
---
drivers/net/wireless/ti/wlcore/spi.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
index e264478..1b0cd98 100644
--- a/drivers/net/wireless/ti/wlcore/spi.c
+++ b/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@...com>");
MODULE_AUTHOR("Juuso Oikarinen <juuso.oikarinen@...ia.com>");
--
1.8.1.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists