From: Sachin Kamat <sachin.kamat@linaro.org>
To: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, chunkeey@googlemail.com,
linville@tuxdriver.com, davem@davemloft.net,
sachin.kamat@linaro.org
Subject: [PATCH 1/2] net: wireless: p54spi: Use module_spi_driver macro
Date: Wed, 29 May 2013 15:31:40 +0530 [thread overview]
Message-ID: <1369821701-4867-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/p54/p54spi.c | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index 978e7eb..146e653 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -713,27 +713,7 @@ static struct spi_driver p54spi_driver = {
.remove = p54spi_remove,
};
-static int __init p54spi_init(void)
-{
- int ret;
-
- ret = spi_register_driver(&p54spi_driver);
- if (ret < 0) {
- printk(KERN_ERR "failed to register SPI driver: %d", ret);
- goto out;
- }
-
-out:
- return ret;
-}
-
-static void __exit p54spi_exit(void)
-{
- spi_unregister_driver(&p54spi_driver);
-}
-
-module_init(p54spi_init);
-module_exit(p54spi_exit);
+module_spi_driver(p54spi_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Christian Lamparter <chunkeey@web.de>");
--
1.7.9.5
next reply other threads:[~2013-05-29 10:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 10:01 Sachin Kamat [this message]
2013-05-29 10:01 ` [PATCH 2/2] net: wireless: p54spi: Fix commenting style Sachin Kamat
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=1369821701-4867-1-git-send-email-sachin.kamat@linaro.org \
--to=sachin.kamat@linaro.org \
--cc=chunkeey@googlemail.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).