net: macb: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Mon, 4 Mar 2013 16:43:18 +0000 (16:43 +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/macb.c

index 7903943..3a5d680 100644 (file)
@@ -1737,18 +1737,7 @@ static struct platform_driver macb_driver = {
        },
 };
 
-static int __init macb_init(void)
-{
-       return platform_driver_probe(&macb_driver, macb_probe);
-}
-
-static void __exit macb_exit(void)
-{
-       platform_driver_unregister(&macb_driver);
-}
-
-module_init(macb_init);
-module_exit(macb_exit);
+module_platform_driver_probe(macb_driver, macb_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Cadence MACB/GEM Ethernet driver");