netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] net: dm9000: Use module_platform_driver()
@ 2013-03-18 11:50 Sachin Kamat
  2013-03-18 11:50 ` [PATCH 2/3] net: ep93xx_eth: " Sachin Kamat
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Sachin Kamat @ 2013-03-18 11:50 UTC (permalink / raw)
  To: netdev; +Cc: davem, sachin.kamat

module_platform_driver macro removes some boilerplate and makes
the code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
This series compile tested against linux-next tree (20130318).
---
 drivers/net/ethernet/davicom/dm9000.c |   17 +----------------
 1 files changed, 1 insertions(+), 16 deletions(-)

diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
index 8cdf025..f38f677 100644
--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -1687,22 +1687,7 @@ static struct platform_driver dm9000_driver = {
 	.remove  = dm9000_drv_remove,
 };
 
-static int __init
-dm9000_init(void)
-{
-	printk(KERN_INFO "%s Ethernet Driver, V%s\n", CARDNAME, DRV_VERSION);
-
-	return platform_driver_register(&dm9000_driver);
-}
-
-static void __exit
-dm9000_cleanup(void)
-{
-	platform_driver_unregister(&dm9000_driver);
-}
-
-module_init(dm9000_init);
-module_exit(dm9000_cleanup);
+module_platform_driver(dm9000_driver);
 
 MODULE_AUTHOR("Sascha Hauer, Ben Dooks");
 MODULE_DESCRIPTION("Davicom DM9000 network driver");
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-03-18 17:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-18 11:50 [PATCH 1/3] net: dm9000: Use module_platform_driver() Sachin Kamat
2013-03-18 11:50 ` [PATCH 2/3] net: ep93xx_eth: " Sachin Kamat
2013-03-18 17:03   ` 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

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).