From db62f684deeb291ab2533b99843d5df9a36b1f19 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Sun, 27 Nov 2011 16:44:17 +0000 Subject: net/ethernet: convert drivers/net/ethernet/* to use module_platform_driver() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch converts the drivers in drivers/net/ethernet/* to use the module_platform_driver() macro which makes the code smaller and a bit simpler. Cc: "David S. Miller" Cc: Pantelis Antoniou Cc: Vitaly Bordug Cc: Wan ZongShun Cc: Nicolas Pitre Cc: Giuseppe Cavallaro Cc: Marc Kleine-Budde Cc: Jeff Kirsher Cc: Jiri Pirko Cc: Daniel Hellstrom Cc: Alexey Dobriyan Cc: Tobias Klauser Cc: Grant Likely Cc: Jiri Kosina Cc: Richard Cochran Cc: Jonas Bonn Cc: Sebastian Poehn Cc: Yoshihiro Shimoda Cc: Ricardo Ribalda Delgado Cc: "Michał Mirosław" Signed-off-by: Axel Lin Acked-by: Wan ZongShun Signed-off-by: David S. Miller --- drivers/net/ethernet/smsc/smc911x.c | 13 +------------ drivers/net/ethernet/smsc/smc91x.c | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-) (limited to 'drivers/net/ethernet/smsc') diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index 8f61fe9db1d0..313ba3b32ab4 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c @@ -2196,15 +2196,4 @@ static struct platform_driver smc911x_driver = { }, }; -static int __init smc911x_init(void) -{ - return platform_driver_register(&smc911x_driver); -} - -static void __exit smc911x_cleanup(void) -{ - platform_driver_unregister(&smc911x_driver); -} - -module_init(smc911x_init); -module_exit(smc911x_cleanup); +module_platform_driver(smc911x_driver); diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index f47f81e25322..64ad3ed74495 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c @@ -2417,15 +2417,4 @@ static struct platform_driver smc_driver = { }, }; -static int __init smc_init(void) -{ - return platform_driver_register(&smc_driver); -} - -static void __exit smc_cleanup(void) -{ - platform_driver_unregister(&smc_driver); -} - -module_init(smc_init); -module_exit(smc_cleanup); +module_platform_driver(smc_driver); -- cgit v1.2.3