From 14f645d0deb4d189612e139c4270a4e82ce8a2db Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Mon, 18 Mar 2013 01:50:48 +0000 Subject: [PATCH] net: ftgmac100: Use module_platform_driver() module_platform_driver macro removes some boilerplate and makes the code simpler. Signed-off-by: Sachin Kamat Cc: Po-Yu Chuang Signed-off-by: David S. Miller --- drivers/net/ethernet/faraday/ftgmac100.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c index 0e817e6084e9..21b85fb7d05f 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 "); MODULE_DESCRIPTION("FTGMAC100 driver"); -- 2.20.1