From: Sachin Kamat <sachin.kamat@linaro.org> To: linux-wireless@vger.kernel.org Cc: netdev@vger.kernel.org, davem@davemloft.net, coelho@ti.com, linville@tuxdriver.com, sachin.kamat@linaro.org Subject: [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro Date: Wed, 29 May 2013 15:48:22 +0530 [thread overview] Message-ID: <1369822703-27769-1-git-send-email-sachin.kamat@linaro.org> (raw) module_spi_driver() eliminates some boiler plate and makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- drivers/net/wireless/ti/wl1251/spi.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c index 4c67c2f..dfd0877 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>"); -- 1.7.9.5
WARNING: multiple messages have this Message-ID (diff)
From: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> To: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org, coelho-l0cyMroinI0@public.gmane.org, linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org, sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org Subject: [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro Date: Wed, 29 May 2013 15:48:22 +0530 [thread overview] Message-ID: <1369822703-27769-1-git-send-email-sachin.kamat@linaro.org> (raw) module_spi_driver() eliminates some boiler plate and makes code simpler. Signed-off-by: Sachin Kamat <sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- drivers/net/wireless/ti/wl1251/spi.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c index 4c67c2f..dfd0877 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"); -}
next reply other threads:[~2013-05-29 10:32 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-05-29 10:18 Sachin Kamat [this message] 2013-05-29 10:18 ` [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro Sachin Kamat 2013-05-29 10:18 ` [PATCH 2/2] net: wireless: wl1251: Fix commenting style Sachin Kamat 2013-05-29 10:18 ` Sachin Kamat 2013-06-06 9:18 ` [PATCH 1/2] net: wireless: wl1251: Use module_spi_driver macro Sachin Kamat 2013-06-06 11:46 ` Luciano Coelho 2013-06-06 11:51 ` Sachin Kamat 2013-06-17 9:24 ` Luciano Coelho
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1369822703-27769-1-git-send-email-sachin.kamat@linaro.org \ --to=sachin.kamat@linaro.org \ --cc=coelho@ti.com \ --cc=davem@davemloft.net \ --cc=linux-wireless@vger.kernel.org \ --cc=linville@tuxdriver.com \ --cc=netdev@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.