summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ti
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2013-05-29 12:18:22 +0200
committerLuciano Coelho <coelho@ti.com>2013-06-17 11:24:09 +0200
commit19a4e68a8a192957f7556a0aae9c37a6bc73cde6 (patch)
treedcc7d235d3fbbfd14fb5d9a391bbc2cc435264a5 /drivers/net/wireless/ti
parentnet/wireless/ti/wlcore/spi: Use module_spi_driver to register driver (diff)
downloadlinux-19a4e68a8a192957f7556a0aae9c37a6bc73cde6.tar.xz
linux-19a4e68a8a192957f7556a0aae9c37a6bc73cde6.zip
net: wireless: wl1251: Use module_spi_driver macro
module_spi_driver() eliminates some boiler plate and makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti')
-rw-r--r--drivers/net/wireless/ti/wl1251/spi.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index 4c67c2f9ea71..dfd087742d1a 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -329,29 +329,7 @@ static struct spi_driver wl1251_spi_driver = {
.remove = wl1251_spi_remove,
};
-static int __init wl1251_spi_init(void)
-{
- int ret;
-
- ret = spi_register_driver(&wl1251_spi_driver);
- if (ret < 0) {
- wl1251_error("failed to register spi driver: %d", ret);
- goto out;
- }
-
-out:
- return ret;
-}
-
-static void __exit wl1251_spi_exit(void)
-{
- spi_unregister_driver(&wl1251_spi_driver);
-
- wl1251_notice("unloaded");
-}
-
-module_init(wl1251_spi_init);
-module_exit(wl1251_spi_exit);
+module_spi_driver(wl1251_spi_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Kalle Valo <kvalo@adurom.com>");