net: ethernet: xilinx: Convert xilinx_axienet to module_platform_driver
authorTobias Klauser <tklauser@distanz.ch>
Fri, 17 Feb 2012 05:35:37 +0000 (05:35 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 17 Feb 2012 21:07:19 +0000 (16:07 -0500)
Follow commit db62f684. Convert the driver to use the
module_platform_driver() macro which makes the code a bit smaller and
simpler.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_axienet_main.c

index a7cf00438a3665f7f2284265c293bbd954d68a57..2fcbeba6814bead15acdae0feff0e3e264c5656d 100644 (file)
@@ -1662,18 +1662,7 @@ static struct platform_driver axienet_of_driver = {
        },
 };
 
-static int __init axienet_init(void)
-{
-       return platform_driver_register(&axienet_of_driver);
-}
-
-static void __exit axienet_exit(void)
-{
-       platform_driver_unregister(&axienet_of_driver);
-}
-
-module_init(axienet_init);
-module_exit(axienet_exit);
+module_platform_driver(axienet_of_driver);
 
 MODULE_DESCRIPTION("Xilinx Axi Ethernet driver");
 MODULE_AUTHOR("Xilinx");