From: Sachin Kamat <sachin.kamat@linaro.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, sachin.kamat@linaro.org, juhosg@openwrt.org
Subject: [PATCH 1/1] net/phy: Use module_spi_driver in spi_ks8995.c
Date: Mon, 27 May 2013 17:21:39 +0530 [thread overview]
Message-ID: <1369655499-17192-1-git-send-email-sachin.kamat@linaro.org> (raw)
module_spi_driver() removes some boilerplate and makes the code
simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/net/phy/spi_ks8995.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/net/phy/spi_ks8995.c b/drivers/net/phy/spi_ks8995.c
index d11c93e..f3bea13 100644
--- a/drivers/net/phy/spi_ks8995.c
+++ b/drivers/net/phy/spi_ks8995.c
@@ -354,19 +354,7 @@ static struct spi_driver ks8995_driver = {
.remove = ks8995_remove,
};
-static int __init ks8995_init(void)
-{
- pr_info(DRV_DESC " version " DRV_VERSION "\n");
-
- return spi_register_driver(&ks8995_driver);
-}
-module_init(ks8995_init);
-
-static void __exit ks8995_exit(void)
-{
- spi_unregister_driver(&ks8995_driver);
-}
-module_exit(ks8995_exit);
+module_spi_driver(ks8995_driver);
MODULE_DESCRIPTION(DRV_DESC);
MODULE_VERSION(DRV_VERSION);
--
1.7.9.5
next reply other threads:[~2013-05-27 12:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-27 11:51 Sachin Kamat [this message]
2013-05-28 6:24 ` [PATCH 1/1] net/phy: Use module_spi_driver in spi_ks8995.c David Miller
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=1369655499-17192-1-git-send-email-sachin.kamat@linaro.org \
--to=sachin.kamat@linaro.org \
--cc=davem@davemloft.net \
--cc=juhosg@openwrt.org \
--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).