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

index 138446957786a9ce0845a7e8221af4887b904ce3..73c1c8c33dd1bdb42c90552f232d6dc4354cd163 100644 (file)
@@ -1978,18 +1978,6 @@ static struct platform_driver cs89x0_driver = {
        .remove = cs89x0_platform_remove,
 };
 
-static int __init cs89x0_init(void)
-{
-       return platform_driver_probe(&cs89x0_driver, cs89x0_platform_probe);
-}
-
-module_init(cs89x0_init);
-
-static void __exit cs89x0_cleanup(void)
-{
-       platform_driver_unregister(&cs89x0_driver);
-}
-
-module_exit(cs89x0_cleanup);
+module_platform_driver_probe(cs89x0_driver, cs89x0_platform_probe);
 
 #endif /* CONFIG_CS89x0_PLATFORM */