net/ethernet: convert drivers/net/ethernet/* to use module_platform_driver()
authorAxel Lin <axel.lin@gmail.com>
Sun, 27 Nov 2011 16:44:17 +0000 (16:44 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Nov 2011 05:25:05 +0000 (00:25 -0500)
This patch converts the drivers in drivers/net/ethernet/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Pantelis Antoniou <pantelis.antoniou@gmail.com>
Cc: Vitaly Bordug <vbordug@ru.mvista.com>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jiri Pirko <jpirko@redhat.com>
Cc: Daniel Hellstrom <daniel@gaisler.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Tobias Klauser <tklauser@distanz.ch>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Richard Cochran <richard.cochran@omicron.at>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Sebastian Poehn <sebastian.poehn@belden.com>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: "Michał Mirosław" <mirq-linux@rere.qmqm.pl>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
31 files changed:
drivers/net/ethernet/8390/ax88796.c
drivers/net/ethernet/aeroflex/greth.c
drivers/net/ethernet/amd/au1000_eth.c
drivers/net/ethernet/amd/sunlance.c
drivers/net/ethernet/broadcom/sb1250-mac.c
drivers/net/ethernet/dnet.c
drivers/net/ethernet/ethoc.c
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c
drivers/net/ethernet/freescale/fs_enet/mii-fec.c
drivers/net/ethernet/freescale/fsl_pq_mdio.c
drivers/net/ethernet/freescale/gianfar.c
drivers/net/ethernet/freescale/gianfar_ptp.c
drivers/net/ethernet/korina.c
drivers/net/ethernet/marvell/pxa168_eth.c
drivers/net/ethernet/micrel/ks8842.c
drivers/net/ethernet/micrel/ks8851_mll.c
drivers/net/ethernet/natsemi/jazzsonic.c
drivers/net/ethernet/natsemi/macsonic.c
drivers/net/ethernet/natsemi/xtsonic.c
drivers/net/ethernet/nuvoton/w90p910_ether.c
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/seeq/sgiseeq.c
drivers/net/ethernet/sgi/meth.c
drivers/net/ethernet/smsc/smc911x.c
drivers/net/ethernet/smsc/smc91x.c
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/sun/sunbmac.c
drivers/net/ethernet/tundra/tsi108_eth.c
drivers/net/ethernet/xilinx/ll_temac_main.c
drivers/net/ethernet/xilinx/xilinx_emaclite.c

index 2a3b8c2676bd5a12833db60c2c429bfef329c2cf..9e8ba4f5636bd71bcf2c9946450b76c587dbddb8 100644 (file)
@@ -990,18 +990,7 @@ static struct platform_driver axdrv = {
        .resume         = ax_resume,
 };
 
-static int __init axdrv_init(void)
-{
-       return platform_driver_register(&axdrv);
-}
-
-static void __exit axdrv_exit(void)
-{
-       platform_driver_unregister(&axdrv);
-}
-
-module_init(axdrv_init);
-module_exit(axdrv_exit);
+module_platform_driver(axdrv);
 
 MODULE_DESCRIPTION("AX88796 10/100 Ethernet platform driver");
 MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>");
index 442fefa4f2ca373caa9759e128493fe0e3824efb..c885aa905decb01c1399ea50639cc2d734d3b419 100644 (file)
@@ -1623,18 +1623,7 @@ static struct platform_driver greth_of_driver = {
        .remove = __devexit_p(greth_of_remove),
 };
 
-static int __init greth_init(void)
-{
-       return platform_driver_register(&greth_of_driver);
-}
-
-static void __exit greth_cleanup(void)
-{
-       platform_driver_unregister(&greth_of_driver);
-}
-
-module_init(greth_init);
-module_exit(greth_cleanup);
+module_platform_driver(greth_of_driver);
 
 MODULE_AUTHOR("Aeroflex Gaisler AB.");
 MODULE_DESCRIPTION("Aeroflex Gaisler Ethernet MAC driver");
index 4865ff14bebf230a9c5a460d2817bd029029493d..cc9262be69c86c68020f7f4568662f0068bb2f4c 100644 (file)
@@ -1339,18 +1339,7 @@ static struct platform_driver au1000_eth_driver = {
                .owner  = THIS_MODULE,
        },
 };
-MODULE_ALIAS("platform:au1000-eth");
-
-
-static int __init au1000_init_module(void)
-{
-       return platform_driver_register(&au1000_eth_driver);
-}
 
-static void __exit au1000_exit_module(void)
-{
-       platform_driver_unregister(&au1000_eth_driver);
-}
+module_platform_driver(au1000_eth_driver);
 
-module_init(au1000_init_module);
-module_exit(au1000_exit_module);
+MODULE_ALIAS("platform:au1000-eth");
index 8fda457f94cf809d82793a659359e78ab0876b7a..7ea16d32a5f5cd49aafb3fbc6e71368c23147674 100644 (file)
@@ -1540,17 +1540,4 @@ static struct platform_driver sunlance_sbus_driver = {
        .remove         = __devexit_p(sunlance_sbus_remove),
 };
 
-
-/* Find all the lance cards on the system and initialize them */
-static int __init sparc_lance_init(void)
-{
-       return platform_driver_register(&sunlance_sbus_driver);
-}
-
-static void __exit sparc_lance_exit(void)
-{
-       platform_driver_unregister(&sunlance_sbus_driver);
-}
-
-module_init(sparc_lance_init);
-module_exit(sparc_lance_exit);
+module_platform_driver(sunlance_sbus_driver);
index aa58f9e3f9135cdfffaa17a08472436bab3c60cb..8fa7abc53ec69a38fce149dbf37acb5eca2a2cf1 100644 (file)
@@ -2675,15 +2675,4 @@ static struct platform_driver sbmac_driver = {
        },
 };
 
-static int __init sbmac_init_module(void)
-{
-       return platform_driver_register(&sbmac_driver);
-}
-
-static void __exit sbmac_cleanup_module(void)
-{
-       platform_driver_unregister(&sbmac_driver);
-}
-
-module_init(sbmac_init_module);
-module_exit(sbmac_cleanup_module);
+module_platform_driver(sbmac_driver);
index d94b9686b80cca89b2063ad570db75ba4f015ba9..ce88c0f399f68903333bbabdf546ea55abfed888 100644 (file)
@@ -977,18 +977,7 @@ static struct platform_driver dnet_driver = {
        },
 };
 
-static int __init dnet_init(void)
-{
-       return platform_driver_register(&dnet_driver);
-}
-
-static void __exit dnet_exit(void)
-{
-       platform_driver_unregister(&dnet_driver);
-}
-
-module_init(dnet_init);
-module_exit(dnet_exit);
+module_platform_driver(dnet_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Dave DNET Ethernet driver");
index 251b635fe75a1a767ff76a21aad8c243dbf21f3c..60f0e788cc256c9887361f28c078b3c20ce64a3a 100644 (file)
@@ -1185,18 +1185,7 @@ static struct platform_driver ethoc_driver = {
        },
 };
 
-static int __init ethoc_init(void)
-{
-       return platform_driver_register(&ethoc_driver);
-}
-
-static void __exit ethoc_exit(void)
-{
-       platform_driver_unregister(&ethoc_driver);
-}
-
-module_init(ethoc_init);
-module_exit(ethoc_exit);
+module_platform_driver(ethoc_driver);
 
 MODULE_AUTHOR("Thierry Reding <thierry.reding@avionic-design.de>");
 MODULE_DESCRIPTION("OpenCores Ethernet MAC driver");
index 5bf5471f06ffd77bf82e9d5c91a90ebb75a38216..910a8e18a9ae435807af5aa91812bba14b99d82c 100644 (file)
@@ -1171,16 +1171,6 @@ static struct platform_driver fs_enet_driver = {
        .remove = fs_enet_remove,
 };
 
-static int __init fs_init(void)
-{
-       return platform_driver_register(&fs_enet_driver);
-}
-
-static void __exit fs_cleanup(void)
-{
-       platform_driver_unregister(&fs_enet_driver);
-}
-
 #ifdef CONFIG_NET_POLL_CONTROLLER
 static void fs_enet_netpoll(struct net_device *dev)
 {
@@ -1190,7 +1180,4 @@ static void fs_enet_netpoll(struct net_device *dev)
 }
 #endif
 
-/**************************************************************************************/
-
-module_init(fs_init);
-module_exit(fs_cleanup);
+module_platform_driver(fs_enet_driver);
index b09270b5d0a56fe484ac0d5a6a77ddaf995adfec..0f2d1a710909e5044b3c2c402bf2aba0b950ff88 100644 (file)
@@ -232,15 +232,4 @@ static struct platform_driver fs_enet_bb_mdio_driver = {
        .remove = fs_enet_mdio_remove,
 };
 
-static int fs_enet_mdio_bb_init(void)
-{
-       return platform_driver_register(&fs_enet_bb_mdio_driver);
-}
-
-static void fs_enet_mdio_bb_exit(void)
-{
-       platform_driver_unregister(&fs_enet_bb_mdio_driver);
-}
-
-module_init(fs_enet_mdio_bb_init);
-module_exit(fs_enet_mdio_bb_exit);
+module_platform_driver(fs_enet_bb_mdio_driver);
index e0e9d6c35d83f61dee22ae9c4c8d54d82e6e538e..55bb867258e6aa1d2baa1dbf4da546c705a2e83f 100644 (file)
@@ -237,15 +237,4 @@ static struct platform_driver fs_enet_fec_mdio_driver = {
        .remove = fs_enet_mdio_remove,
 };
 
-static int fs_enet_mdio_fec_init(void)
-{
-       return platform_driver_register(&fs_enet_fec_mdio_driver);
-}
-
-static void fs_enet_mdio_fec_exit(void)
-{
-       platform_driver_unregister(&fs_enet_fec_mdio_driver);
-}
-
-module_init(fs_enet_mdio_fec_init);
-module_exit(fs_enet_mdio_fec_exit);
+module_platform_driver(fs_enet_fec_mdio_driver);
index 8dee1aed47e4c15a912cbddcb29608fa5ed3f811..f1096027b186f60f690e652669589955c835e83d 100644 (file)
@@ -443,15 +443,6 @@ static struct platform_driver fsl_pq_mdio_driver = {
        .remove = fsl_pq_mdio_remove,
 };
 
-int __init fsl_pq_mdio_init(void)
-{
-       return platform_driver_register(&fsl_pq_mdio_driver);
-}
-module_init(fsl_pq_mdio_init);
+module_platform_driver(fsl_pq_mdio_driver);
 
-void fsl_pq_mdio_exit(void)
-{
-       platform_driver_unregister(&fsl_pq_mdio_driver);
-}
-module_exit(fsl_pq_mdio_exit);
 MODULE_LICENSE("GPL");
index 8e21ceb3b7da673ec590bf102f302dc76437a45a..e01cdaa722a977eac9b6c66513dfe13a44b97a44 100644 (file)
@@ -3281,16 +3281,4 @@ static struct platform_driver gfar_driver = {
        .remove = gfar_remove,
 };
 
-static int __init gfar_init(void)
-{
-       return platform_driver_register(&gfar_driver);
-}
-
-static void __exit gfar_exit(void)
-{
-       platform_driver_unregister(&gfar_driver);
-}
-
-module_init(gfar_init);
-module_exit(gfar_exit);
-
+module_platform_driver(gfar_driver);
index f67b8aebc89c3d71fe30c41bd1dff1265a7c1fb1..83e0ed757e338aa14a453d2800e31c8efe9eab5a 100644 (file)
@@ -562,21 +562,7 @@ static struct platform_driver gianfar_ptp_driver = {
        .remove      = gianfar_ptp_remove,
 };
 
-/* module operations */
-
-static int __init ptp_gianfar_init(void)
-{
-       return platform_driver_register(&gianfar_ptp_driver);
-}
-
-module_init(ptp_gianfar_init);
-
-static void __exit ptp_gianfar_exit(void)
-{
-       platform_driver_unregister(&gianfar_ptp_driver);
-}
-
-module_exit(ptp_gianfar_exit);
+module_platform_driver(gianfar_ptp_driver);
 
 MODULE_AUTHOR("Richard Cochran <richard.cochran@omicron.at>");
 MODULE_DESCRIPTION("PTP clock using the eTSEC");
index d8430f487b84f8012ec8390e522ae19eeba9949e..6ad094f176f8b175d6a3c63f1d61b6fbd3e06ec6 100644 (file)
@@ -1230,18 +1230,7 @@ static struct platform_driver korina_driver = {
        .remove = korina_remove,
 };
 
-static int __init korina_init_module(void)
-{
-       return platform_driver_register(&korina_driver);
-}
-
-static void korina_cleanup_module(void)
-{
-       return platform_driver_unregister(&korina_driver);
-}
-
-module_init(korina_init_module);
-module_exit(korina_cleanup_module);
+module_platform_driver(korina_driver);
 
 MODULE_AUTHOR("Philip Rischel <rischelp@idt.com>");
 MODULE_AUTHOR("Felix Fietkau <nbd@openwrt.org>");
index d17d0624c5e63d13689673ba16295c51aefb1297..5ec409e3da090d6657afb2bf45e5ffa6d4e339e4 100644 (file)
@@ -1645,18 +1645,7 @@ static struct platform_driver pxa168_eth_driver = {
                   },
 };
 
-static int __init pxa168_init_module(void)
-{
-       return platform_driver_register(&pxa168_eth_driver);
-}
-
-static void __exit pxa168_cleanup_module(void)
-{
-       platform_driver_unregister(&pxa168_eth_driver);
-}
-
-module_init(pxa168_init_module);
-module_exit(pxa168_cleanup_module);
+module_platform_driver(pxa168_eth_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Ethernet driver for Marvell PXA168");
index 4a6ae057e3b1ad408335c47644647bc1207ac70f..75ec87a822b8e2d1ee12486bc6cfcbf0f3e0a248 100644 (file)
@@ -1264,18 +1264,7 @@ static struct platform_driver ks8842_platform_driver = {
        .remove         = ks8842_remove,
 };
 
-static int __init ks8842_init(void)
-{
-       return platform_driver_register(&ks8842_platform_driver);
-}
-
-static void __exit ks8842_exit(void)
-{
-       platform_driver_unregister(&ks8842_platform_driver);
-}
-
-module_init(ks8842_init);
-module_exit(ks8842_exit);
+module_platform_driver(ks8842_platform_driver);
 
 MODULE_DESCRIPTION("Timberdale KS8842 ethernet driver");
 MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>");
index 228c5c0b50dead392628ec23e2e7455eb5e36c5b..e58e78e5c930048d0dccf4202478b7da4d227b91 100644 (file)
@@ -1658,18 +1658,7 @@ static struct platform_driver ks8851_platform_driver = {
        .remove = __devexit_p(ks8851_remove),
 };
 
-static int __init ks8851_init(void)
-{
-       return platform_driver_register(&ks8851_platform_driver);
-}
-
-static void __exit ks8851_exit(void)
-{
-       platform_driver_unregister(&ks8851_platform_driver);
-}
-
-module_init(ks8851_init);
-module_exit(ks8851_exit);
+module_platform_driver(ks8851_platform_driver);
 
 MODULE_DESCRIPTION("KS8851 MLL Network driver");
 MODULE_AUTHOR("David Choi <david.choi@micrel.com>");
index fc7c6a932ad95b8e19e0f977f0144842ef439bd9..5b89fd377ae3723c0bfed198c8a145dda867b53f 100644 (file)
@@ -294,15 +294,4 @@ static struct platform_driver jazz_sonic_driver = {
        },
 };
 
-static int __init jazz_sonic_init_module(void)
-{
-       return platform_driver_register(&jazz_sonic_driver);
-}
-
-static void __exit jazz_sonic_cleanup_module(void)
-{
-       platform_driver_unregister(&jazz_sonic_driver);
-}
-
-module_init(jazz_sonic_init_module);
-module_exit(jazz_sonic_cleanup_module);
+module_platform_driver(jazz_sonic_driver);
index a2eacbfb4252fa0f8da5dee5928abc380f3a11e0..70367d76fc8dc56467819bbc249c95e19d0ac8f9 100644 (file)
@@ -643,15 +643,4 @@ static struct platform_driver mac_sonic_driver = {
        },
 };
 
-static int __init mac_sonic_init_module(void)
-{
-       return platform_driver_register(&mac_sonic_driver);
-}
-
-static void __exit mac_sonic_cleanup_module(void)
-{
-       platform_driver_unregister(&mac_sonic_driver);
-}
-
-module_init(mac_sonic_init_module);
-module_exit(mac_sonic_cleanup_module);
+module_platform_driver(mac_sonic_driver);
index ccf61b9da8d1f59bd0be03a8e2d394683bdfa174..e01c0a07a93ac15f490021b34e321f64433537b6 100644 (file)
@@ -319,15 +319,4 @@ static struct platform_driver xtsonic_driver = {
        },
 };
 
-static int __init xtsonic_init(void)
-{
-       return platform_driver_register(&xtsonic_driver);
-}
-
-static void __exit xtsonic_cleanup(void)
-{
-       platform_driver_unregister(&xtsonic_driver);
-}
-
-module_init(xtsonic_init);
-module_exit(xtsonic_cleanup);
+module_platform_driver(xtsonic_driver);
index f1bfb8f8fcf01759ec711b80a413780e0eea030c..b75a0497d58dbdbdb362d8e857ce8f75bf7e22f9 100644 (file)
@@ -1103,18 +1103,7 @@ static struct platform_driver w90p910_ether_driver = {
        },
 };
 
-static int __init w90p910_ether_init(void)
-{
-       return platform_driver_register(&w90p910_ether_driver);
-}
-
-static void __exit w90p910_ether_exit(void)
-{
-       platform_driver_unregister(&w90p910_ether_driver);
-}
-
-module_init(w90p910_ether_init);
-module_exit(w90p910_ether_exit);
+module_platform_driver(w90p910_ether_driver);
 
 MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>");
 MODULE_DESCRIPTION("w90p910 MAC driver!");
index 9b230740c6ab37cdbba640aa9435e6cee73d9add..ebfb682dfe5500f90609bdc74630320c80454c02 100644 (file)
@@ -1957,18 +1957,7 @@ static struct platform_driver sh_eth_driver = {
        },
 };
 
-static int __init sh_eth_init(void)
-{
-       return platform_driver_register(&sh_eth_driver);
-}
-
-static void __exit sh_eth_cleanup(void)
-{
-       platform_driver_unregister(&sh_eth_driver);
-}
-
-module_init(sh_eth_init);
-module_exit(sh_eth_cleanup);
+module_platform_driver(sh_eth_driver);
 
 MODULE_AUTHOR("Nobuhiro Iwamatsu, Yoshihiro Shimoda");
 MODULE_DESCRIPTION("Renesas SuperH Ethernet driver");
index c3673f151a41f2001a0f46fddb22473c05be3cc0..f955a19eb22f28d39435dde9aab90cdad8381ea8 100644 (file)
@@ -834,23 +834,7 @@ static struct platform_driver sgiseeq_driver = {
        }
 };
 
-static int __init sgiseeq_module_init(void)
-{
-       if (platform_driver_register(&sgiseeq_driver)) {
-               printk(KERN_ERR "Driver registration failed\n");
-               return -ENODEV;
-       }
-
-       return 0;
-}
-
-static void __exit sgiseeq_module_exit(void)
-{
-       platform_driver_unregister(&sgiseeq_driver);
-}
-
-module_init(sgiseeq_module_init);
-module_exit(sgiseeq_module_exit);
+module_platform_driver(sgiseeq_driver);
 
 MODULE_DESCRIPTION("SGI Seeq 8003 driver");
 MODULE_AUTHOR("Linux/MIPS Mailing List <linux-mips@linux-mips.org>");
index 60135aa558025bc9f86b434aa5e8b330476dec82..f98c6c6eedcd8dac6d8accfc0a605097c6f47737 100644 (file)
@@ -830,24 +830,7 @@ static struct platform_driver meth_driver = {
        }
 };
 
-static int __init meth_init_module(void)
-{
-       int err;
-
-       err = platform_driver_register(&meth_driver);
-       if (err)
-               printk(KERN_ERR "Driver registration failed\n");
-
-       return err;
-}
-
-static void __exit meth_exit_module(void)
-{
-       platform_driver_unregister(&meth_driver);
-}
-
-module_init(meth_init_module);
-module_exit(meth_exit_module);
+module_platform_driver(meth_driver);
 
 MODULE_AUTHOR("Ilya Volynets <ilya@theIlya.com>");
 MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver");
index 8f61fe9db1d0b6f10d86067c56ceac2788f94d87..313ba3b32ab476be80d43f4b4773271f1b17760e 100644 (file)
@@ -2196,15 +2196,4 @@ static struct platform_driver smc911x_driver = {
        },
 };
 
-static int __init smc911x_init(void)
-{
-       return platform_driver_register(&smc911x_driver);
-}
-
-static void __exit smc911x_cleanup(void)
-{
-       platform_driver_unregister(&smc911x_driver);
-}
-
-module_init(smc911x_init);
-module_exit(smc911x_cleanup);
+module_platform_driver(smc911x_driver);
index f47f81e25322942d18abd0c929cb17ca2730a7db..64ad3ed74495f171e29ff5d4e88c1d1efeab8a51 100644 (file)
@@ -2417,15 +2417,4 @@ static struct platform_driver smc_driver = {
        },
 };
 
-static int __init smc_init(void)
-{
-       return platform_driver_register(&smc_driver);
-}
-
-static void __exit smc_cleanup(void)
-{
-       platform_driver_unregister(&smc_driver);
-}
-
-module_init(smc_init);
-module_exit(smc_cleanup);
+module_platform_driver(smc_driver);
index 20e8267e8e402158a73a617c84a92bf78eece8f3..24c2bf69711800519e1263ef05e616e1476e431e 100644 (file)
@@ -2131,27 +2131,6 @@ static struct platform_driver stmmac_driver = {
        },
 };
 
-/**
- * stmmac_init_module - Entry point for the driver
- * Description: This function is the entry point for the driver.
- */
-static int __init stmmac_init_module(void)
-{
-       int ret;
-
-       ret = platform_driver_register(&stmmac_driver);
-       return ret;
-}
-
-/**
- * stmmac_cleanup_module - Cleanup routine for the driver
- * Description: This function is the cleanup routine for the driver.
- */
-static void __exit stmmac_cleanup_module(void)
-{
-       platform_driver_unregister(&stmmac_driver);
-}
-
 #ifndef MODULE
 static int __init stmmac_cmdline_opt(char *str)
 {
@@ -2211,8 +2190,7 @@ err:
 __setup("stmmaceth=", stmmac_cmdline_opt);
 #endif
 
-module_init(stmmac_init_module);
-module_exit(stmmac_cleanup_module);
+module_platform_driver(stmmac_driver);
 
 MODULE_DESCRIPTION("STMMAC 10/100/1000 Ethernet driver");
 MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>");
index 0d8cfd9ea0538a0fd4379f4d54d92ed297bb2d22..220f724c3377dcfb8a152174100f80e1395674d7 100644 (file)
@@ -1293,15 +1293,4 @@ static struct platform_driver bigmac_sbus_driver = {
        .remove         = __devexit_p(bigmac_sbus_remove),
 };
 
-static int __init bigmac_init(void)
-{
-       return platform_driver_register(&bigmac_sbus_driver);
-}
-
-static void __exit bigmac_exit(void)
-{
-       platform_driver_unregister(&bigmac_sbus_driver);
-}
-
-module_init(bigmac_init);
-module_exit(bigmac_exit);
+module_platform_driver(bigmac_sbus_driver);
index a8df7eca0956d2836f9c4562905b505aa10f7460..a9ce01bafd200c34265f33e4cff8d202719a5312 100644 (file)
@@ -1688,18 +1688,6 @@ static void tsi108_timed_checker(unsigned long dev_ptr)
        mod_timer(&data->timer, jiffies + CHECK_PHY_INTERVAL);
 }
 
-static int tsi108_ether_init(void)
-{
-       int ret;
-       ret = platform_driver_register (&tsi_eth_driver);
-       if (ret < 0){
-               printk("tsi108_ether_init: error initializing ethernet "
-                      "device\n");
-               return ret;
-       }
-       return 0;
-}
-
 static int tsi108_ether_remove(struct platform_device *pdev)
 {
        struct net_device *dev = platform_get_drvdata(pdev);
@@ -1714,13 +1702,7 @@ static int tsi108_ether_remove(struct platform_device *pdev)
 
        return 0;
 }
-static void tsi108_ether_exit(void)
-{
-       platform_driver_unregister(&tsi_eth_driver);
-}
-
-module_init(tsi108_ether_init);
-module_exit(tsi108_ether_exit);
+module_platform_driver(tsi_eth_driver);
 
 MODULE_AUTHOR("Tundra Semiconductor Corporation");
 MODULE_DESCRIPTION("Tsi108 Gigabit Ethernet driver");
index 1ade9e18d29937f2554507fcdac9ede165eacba8..282330d9801bf7a5deb42f2835de5f1a77325703 100644 (file)
@@ -1181,17 +1181,7 @@ static struct platform_driver temac_of_driver = {
        },
 };
 
-static int __init temac_init(void)
-{
-       return platform_driver_register(&temac_of_driver);
-}
-module_init(temac_init);
-
-static void __exit temac_exit(void)
-{
-       platform_driver_unregister(&temac_of_driver);
-}
-module_exit(temac_exit);
+module_platform_driver(temac_of_driver);
 
 MODULE_DESCRIPTION("Xilinx LL_TEMAC Ethernet driver");
 MODULE_AUTHOR("Yoshio Kashiwagi");
index 8018d7d045b044bbd0bb5dfa403e53d47d1bf390..dca65410bfc53bc1065bb35e0b2d9a390bced677 100644 (file)
@@ -1303,27 +1303,7 @@ static struct platform_driver xemaclite_of_driver = {
        .remove         = __devexit_p(xemaclite_of_remove),
 };
 
-/**
- * xgpiopss_init - Initial driver registration call
- *
- * Return:     0 upon success, or a negative error upon failure.
- */
-static int __init xemaclite_init(void)
-{
-       /* No kernel boot options used, we just need to register the driver */
-       return platform_driver_register(&xemaclite_of_driver);
-}
-
-/**
- * xemaclite_cleanup - Driver un-registration call
- */
-static void __exit xemaclite_cleanup(void)
-{
-       platform_driver_unregister(&xemaclite_of_driver);
-}
-
-module_init(xemaclite_init);
-module_exit(xemaclite_cleanup);
+module_platform_driver(xemaclite_of_driver);
 
 MODULE_AUTHOR("Xilinx, Inc.");
 MODULE_DESCRIPTION("Xilinx Ethernet MAC Lite driver");