net: at91_ether: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Mon, 4 Mar 2013 16:42:03 +0000 (16:42 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Mar 2013 04:39:13 +0000 (23:39 -0500)
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cadence/at91_ether.c

index 3becdb2deb46c8dbfb3faa4e2916e1cdf41bc6d3..1a57e16ada7c5fce42e2b2e9ba4cf272431a1f5f 100644 (file)
@@ -519,18 +519,7 @@ static struct platform_driver at91ether_driver = {
        },
 };
 
-static int __init at91ether_init(void)
-{
-       return platform_driver_probe(&at91ether_driver, at91ether_probe);
-}
-
-static void __exit at91ether_exit(void)
-{
-       platform_driver_unregister(&at91ether_driver);
-}
-
-module_init(at91ether_init)
-module_exit(at91ether_exit)
+module_platform_driver_probe(at91ether_driver, at91ether_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("AT91RM9200 EMAC Ethernet driver");