net: fec: use module_platform_driver
authorFabio Estevam <festevam@gmail.com>
Mon, 23 Jan 2012 16:44:50 +0000 (16:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 25 Jan 2012 04:00:02 +0000 (23:00 -0500)
Using module_platform_driver can make the code smaller.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/fec.c

index 7b25e9cf13f6ff5a6c141cd6c6bd478fe5e5c6fb..e5885ccfc8ff07505c77860719b0f971d5d73835 100644 (file)
@@ -1739,21 +1739,6 @@ static struct platform_driver fec_driver = {
        .remove = __devexit_p(fec_drv_remove),
 };
 
-static int __init
-fec_enet_module_init(void)
-{
-       printk(KERN_INFO "FEC Ethernet Driver\n");
-
-       return platform_driver_register(&fec_driver);
-}
-
-static void __exit
-fec_enet_cleanup(void)
-{
-       platform_driver_unregister(&fec_driver);
-}
-
-module_exit(fec_enet_cleanup);
-module_init(fec_enet_module_init);
+module_platform_driver(fec_driver);
 
 MODULE_LICENSE("GPL");