From a8f9c3e4c9826fb277453ed02d059591d6b6ebae Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Mon, 18 Mar 2013 01:50:46 +0000 Subject: [PATCH] net: dm9000: Use module_platform_driver() module_platform_driver macro removes some boilerplate and makes the code simpler. Signed-off-by: Sachin Kamat Signed-off-by: David S. Miller --- drivers/net/ethernet/davicom/dm9000.c | 17 +---------------- 1 file changed, 1 insertion(+), 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"); -- 2.7.4