[PATCH] net: ethernet: xilinx: Convert xilinx_axienet to module_platform_driver

DORMANTno replies

From: Tobias Klauser <tklauser@distanz.ch>
Date: 2012-02-17 15:45:30
Subsystem: networking drivers, the rest, xilinx axi ethernet driver · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds, Radhey Shyam Pandey

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>
---
 drivers/net/ethernet/xilinx/xilinx_axienet_main.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
index a7cf004..2fcbeba 100644
--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
@@ -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");
-- 
1.7.5.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help