[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1363607448-17369-3-git-send-email-sachin.kamat@linaro.org>
Date: Mon, 18 Mar 2013 17:20:48 +0530
From: Sachin Kamat <sachin.kamat@...aro.org>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, sachin.kamat@...aro.org,
Po-Yu Chuang <ratbert@...aday-tech.com>
Subject: [PATCH 3/3] net: ftgmac100: Use module_platform_driver()
module_platform_driver macro removes some boilerplate and makes
the code simpler.
Signed-off-by: Sachin Kamat <sachin.kamat@...aro.org>
Cc: Po-Yu Chuang <ratbert@...aday-tech.com>
---
drivers/net/ethernet/faraday/ftgmac100.c | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index 0e817e6..21b85fb 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -1349,22 +1349,7 @@ static struct platform_driver ftgmac100_driver = {
},
};
-/******************************************************************************
- * initialization / finalization
- *****************************************************************************/
-static int __init ftgmac100_init(void)
-{
- pr_info("Loading version " DRV_VERSION " ...\n");
- return platform_driver_register(&ftgmac100_driver);
-}
-
-static void __exit ftgmac100_exit(void)
-{
- platform_driver_unregister(&ftgmac100_driver);
-}
-
-module_init(ftgmac100_init);
-module_exit(ftgmac100_exit);
+module_platform_driver(ftgmac100_driver);
MODULE_AUTHOR("Po-Yu Chuang <ratbert@...aday-tech.com>");
MODULE_DESCRIPTION("FTGMAC100 driver");
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists