From: Sachin Kamat <sachin.kamat@linaro.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, sachin.kamat@linaro.org
Subject: [PATCH 2/3] net: ep93xx_eth: Use module_platform_driver()
Date: Mon, 18 Mar 2013 17:20:47 +0530 [thread overview]
Message-ID: <1363607448-17369-2-git-send-email-sachin.kamat@linaro.org> (raw)
In-Reply-To: <1363607448-17369-1-git-send-email-sachin.kamat@linaro.org>
module_platform_driver macro removes some boilerplate and makes
the code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/net/ethernet/cirrus/ep93xx_eth.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c
index 354cbb7..67b0388 100644
--- a/drivers/net/ethernet/cirrus/ep93xx_eth.c
+++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c
@@ -887,18 +887,7 @@ static struct platform_driver ep93xx_eth_driver = {
},
};
-static int __init ep93xx_eth_init_module(void)
-{
- printk(KERN_INFO DRV_MODULE_NAME " version " DRV_MODULE_VERSION " loading\n");
- return platform_driver_register(&ep93xx_eth_driver);
-}
-
-static void __exit ep93xx_eth_cleanup_module(void)
-{
- platform_driver_unregister(&ep93xx_eth_driver);
-}
+module_platform_driver(ep93xx_eth_driver);
-module_init(ep93xx_eth_init_module);
-module_exit(ep93xx_eth_cleanup_module);
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:ep93xx-eth");
--
1.7.4.1
next prev parent reply other threads:[~2013-03-18 12:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-18 11:50 [PATCH 1/3] net: dm9000: Use module_platform_driver() Sachin Kamat
2013-03-18 11:50 ` Sachin Kamat [this message]
2013-03-18 17:03 ` [PATCH 2/3] net: ep93xx_eth: " David Miller
2013-03-18 11:50 ` [PATCH 3/3] net: ftgmac100: " Sachin Kamat
2013-03-18 17:03 ` David Miller
2013-03-18 17:02 ` [PATCH 1/3] net: dm9000: " 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=1363607448-17369-2-git-send-email-sachin.kamat@linaro.org \
--to=sachin.kamat@linaro.org \
--cc=davem@davemloft.net \
--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).