diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-27 11:44:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-11-29 00:25:05 -0500 |
commit | db62f684deeb291ab2533b99843d5df9a36b1f19 (patch) | |
tree | 995a648ecfd7374e546a2945ba6328ea2432d431 /drivers/net | |
parent | 871d33725545ca2e402b4526f38f89d041ba930f (diff) |
net/ethernet: convert drivers/net/ethernet/* to use module_platform_driver()
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>
Diffstat (limited to 'drivers/net')
31 files changed, 32 insertions, 416 deletions
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c index 2a3b8c2676bd..9e8ba4f5636b 100644 --- a/drivers/net/ethernet/8390/ax88796.c +++ b/drivers/net/ethernet/8390/ax88796.c | |||
@@ -990,18 +990,7 @@ static struct platform_driver axdrv = { | |||
990 | .resume = ax_resume, | 990 | .resume = ax_resume, |
991 | }; | 991 | }; |
992 | 992 | ||
993 | static int __init axdrv_init(void) | 993 | module_platform_driver(axdrv); |
994 | { | ||
995 | return platform_driver_register(&axdrv); | ||
996 | } | ||
997 | |||
998 | static void __exit axdrv_exit(void) | ||
999 | { | ||
1000 | platform_driver_unregister(&axdrv); | ||
1001 | } | ||
1002 | |||
1003 | module_init(axdrv_init); | ||
1004 | module_exit(axdrv_exit); | ||
1005 | 994 | ||
1006 | MODULE_DESCRIPTION("AX88796 10/100 Ethernet platform driver"); | 995 | MODULE_DESCRIPTION("AX88796 10/100 Ethernet platform driver"); |
1007 | MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); | 996 | MODULE_AUTHOR("Ben Dooks, <ben@simtec.co.uk>"); |
diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c index 442fefa4f2ca..c885aa905dec 100644 --- a/drivers/net/ethernet/aeroflex/greth.c +++ b/drivers/net/ethernet/aeroflex/greth.c | |||
@@ -1623,18 +1623,7 @@ static struct platform_driver greth_of_driver = { | |||
1623 | .remove = __devexit_p(greth_of_remove), | 1623 | .remove = __devexit_p(greth_of_remove), |
1624 | }; | 1624 | }; |
1625 | 1625 | ||
1626 | static int __init greth_init(void) | 1626 | module_platform_driver(greth_of_driver); |
1627 | { | ||
1628 | return platform_driver_register(&greth_of_driver); | ||
1629 | } | ||
1630 | |||
1631 | static void __exit greth_cleanup(void) | ||
1632 | { | ||
1633 | platform_driver_unregister(&greth_of_driver); | ||
1634 | } | ||
1635 | |||
1636 | module_init(greth_init); | ||
1637 | module_exit(greth_cleanup); | ||
1638 | 1627 | ||
1639 | MODULE_AUTHOR("Aeroflex Gaisler AB."); | 1628 | MODULE_AUTHOR("Aeroflex Gaisler AB."); |
1640 | MODULE_DESCRIPTION("Aeroflex Gaisler Ethernet MAC driver"); | 1629 | MODULE_DESCRIPTION("Aeroflex Gaisler Ethernet MAC driver"); |
diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c index 4865ff14bebf..cc9262be69c8 100644 --- a/drivers/net/ethernet/amd/au1000_eth.c +++ b/drivers/net/ethernet/amd/au1000_eth.c | |||
@@ -1339,18 +1339,7 @@ static struct platform_driver au1000_eth_driver = { | |||
1339 | .owner = THIS_MODULE, | 1339 | .owner = THIS_MODULE, |
1340 | }, | 1340 | }, |
1341 | }; | 1341 | }; |
1342 | MODULE_ALIAS("platform:au1000-eth"); | ||
1343 | |||
1344 | |||
1345 | static int __init au1000_init_module(void) | ||
1346 | { | ||
1347 | return platform_driver_register(&au1000_eth_driver); | ||
1348 | } | ||
1349 | 1342 | ||
1350 | static void __exit au1000_exit_module(void) | 1343 | module_platform_driver(au1000_eth_driver); |
1351 | { | ||
1352 | platform_driver_unregister(&au1000_eth_driver); | ||
1353 | } | ||
1354 | 1344 | ||
1355 | module_init(au1000_init_module); | 1345 | MODULE_ALIAS("platform:au1000-eth"); |
1356 | module_exit(au1000_exit_module); | ||
diff --git a/drivers/net/ethernet/amd/sunlance.c b/drivers/net/ethernet/amd/sunlance.c index 8fda457f94cf..7ea16d32a5f5 100644 --- a/drivers/net/ethernet/amd/sunlance.c +++ b/drivers/net/ethernet/amd/sunlance.c | |||
@@ -1540,17 +1540,4 @@ static struct platform_driver sunlance_sbus_driver = { | |||
1540 | .remove = __devexit_p(sunlance_sbus_remove), | 1540 | .remove = __devexit_p(sunlance_sbus_remove), |
1541 | }; | 1541 | }; |
1542 | 1542 | ||
1543 | 1543 | module_platform_driver(sunlance_sbus_driver); | |
1544 | /* Find all the lance cards on the system and initialize them */ | ||
1545 | static int __init sparc_lance_init(void) | ||
1546 | { | ||
1547 | return platform_driver_register(&sunlance_sbus_driver); | ||
1548 | } | ||
1549 | |||
1550 | static void __exit sparc_lance_exit(void) | ||
1551 | { | ||
1552 | platform_driver_unregister(&sunlance_sbus_driver); | ||
1553 | } | ||
1554 | |||
1555 | module_init(sparc_lance_init); | ||
1556 | module_exit(sparc_lance_exit); | ||
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c index aa58f9e3f913..8fa7abc53ec6 100644 --- a/drivers/net/ethernet/broadcom/sb1250-mac.c +++ b/drivers/net/ethernet/broadcom/sb1250-mac.c | |||
@@ -2675,15 +2675,4 @@ static struct platform_driver sbmac_driver = { | |||
2675 | }, | 2675 | }, |
2676 | }; | 2676 | }; |
2677 | 2677 | ||
2678 | static int __init sbmac_init_module(void) | 2678 | module_platform_driver(sbmac_driver); |
2679 | { | ||
2680 | return platform_driver_register(&sbmac_driver); | ||
2681 | } | ||
2682 | |||
2683 | static void __exit sbmac_cleanup_module(void) | ||
2684 | { | ||
2685 | platform_driver_unregister(&sbmac_driver); | ||
2686 | } | ||
2687 | |||
2688 | module_init(sbmac_init_module); | ||
2689 | module_exit(sbmac_cleanup_module); | ||
diff --git a/drivers/net/ethernet/dnet.c b/drivers/net/ethernet/dnet.c index d94b9686b80c..ce88c0f399f6 100644 --- a/drivers/net/ethernet/dnet.c +++ b/drivers/net/ethernet/dnet.c | |||
@@ -977,18 +977,7 @@ static struct platform_driver dnet_driver = { | |||
977 | }, | 977 | }, |
978 | }; | 978 | }; |
979 | 979 | ||
980 | static int __init dnet_init(void) | 980 | module_platform_driver(dnet_driver); |
981 | { | ||
982 | return platform_driver_register(&dnet_driver); | ||
983 | } | ||
984 | |||
985 | static void __exit dnet_exit(void) | ||
986 | { | ||
987 | platform_driver_unregister(&dnet_driver); | ||
988 | } | ||
989 | |||
990 | module_init(dnet_init); | ||
991 | module_exit(dnet_exit); | ||
992 | 981 | ||
993 | MODULE_LICENSE("GPL"); | 982 | MODULE_LICENSE("GPL"); |
994 | MODULE_DESCRIPTION("Dave DNET Ethernet driver"); | 983 | MODULE_DESCRIPTION("Dave DNET Ethernet driver"); |
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c index 251b635fe75a..60f0e788cc25 100644 --- a/drivers/net/ethernet/ethoc.c +++ b/drivers/net/ethernet/ethoc.c | |||
@@ -1185,18 +1185,7 @@ static struct platform_driver ethoc_driver = { | |||
1185 | }, | 1185 | }, |
1186 | }; | 1186 | }; |
1187 | 1187 | ||
1188 | static int __init ethoc_init(void) | 1188 | module_platform_driver(ethoc_driver); |
1189 | { | ||
1190 | return platform_driver_register(ðoc_driver); | ||
1191 | } | ||
1192 | |||
1193 | static void __exit ethoc_exit(void) | ||
1194 | { | ||
1195 | platform_driver_unregister(ðoc_driver); | ||
1196 | } | ||
1197 | |||
1198 | module_init(ethoc_init); | ||
1199 | module_exit(ethoc_exit); | ||
1200 | 1189 | ||
1201 | MODULE_AUTHOR("Thierry Reding <thierry.reding@avionic-design.de>"); | 1190 | MODULE_AUTHOR("Thierry Reding <thierry.reding@avionic-design.de>"); |
1202 | MODULE_DESCRIPTION("OpenCores Ethernet MAC driver"); | 1191 | MODULE_DESCRIPTION("OpenCores Ethernet MAC driver"); |
diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c index 5bf5471f06ff..910a8e18a9ae 100644 --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | |||
@@ -1171,16 +1171,6 @@ static struct platform_driver fs_enet_driver = { | |||
1171 | .remove = fs_enet_remove, | 1171 | .remove = fs_enet_remove, |
1172 | }; | 1172 | }; |
1173 | 1173 | ||
1174 | static int __init fs_init(void) | ||
1175 | { | ||
1176 | return platform_driver_register(&fs_enet_driver); | ||
1177 | } | ||
1178 | |||
1179 | static void __exit fs_cleanup(void) | ||
1180 | { | ||
1181 | platform_driver_unregister(&fs_enet_driver); | ||
1182 | } | ||
1183 | |||
1184 | #ifdef CONFIG_NET_POLL_CONTROLLER | 1174 | #ifdef CONFIG_NET_POLL_CONTROLLER |
1185 | static void fs_enet_netpoll(struct net_device *dev) | 1175 | static void fs_enet_netpoll(struct net_device *dev) |
1186 | { | 1176 | { |
@@ -1190,7 +1180,4 @@ static void fs_enet_netpoll(struct net_device *dev) | |||
1190 | } | 1180 | } |
1191 | #endif | 1181 | #endif |
1192 | 1182 | ||
1193 | /**************************************************************************************/ | 1183 | module_platform_driver(fs_enet_driver); |
1194 | |||
1195 | module_init(fs_init); | ||
1196 | module_exit(fs_cleanup); | ||
diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c index b09270b5d0a5..0f2d1a710909 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c +++ b/drivers/net/ethernet/freescale/fs_enet/mii-bitbang.c | |||
@@ -232,15 +232,4 @@ static struct platform_driver fs_enet_bb_mdio_driver = { | |||
232 | .remove = fs_enet_mdio_remove, | 232 | .remove = fs_enet_mdio_remove, |
233 | }; | 233 | }; |
234 | 234 | ||
235 | static int fs_enet_mdio_bb_init(void) | 235 | module_platform_driver(fs_enet_bb_mdio_driver); |
236 | { | ||
237 | return platform_driver_register(&fs_enet_bb_mdio_driver); | ||
238 | } | ||
239 | |||
240 | static void fs_enet_mdio_bb_exit(void) | ||
241 | { | ||
242 | platform_driver_unregister(&fs_enet_bb_mdio_driver); | ||
243 | } | ||
244 | |||
245 | module_init(fs_enet_mdio_bb_init); | ||
246 | module_exit(fs_enet_mdio_bb_exit); | ||
diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c index e0e9d6c35d83..55bb867258e6 100644 --- a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c +++ b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c | |||
@@ -237,15 +237,4 @@ static struct platform_driver fs_enet_fec_mdio_driver = { | |||
237 | .remove = fs_enet_mdio_remove, | 237 | .remove = fs_enet_mdio_remove, |
238 | }; | 238 | }; |
239 | 239 | ||
240 | static int fs_enet_mdio_fec_init(void) | 240 | module_platform_driver(fs_enet_fec_mdio_driver); |
241 | { | ||
242 | return platform_driver_register(&fs_enet_fec_mdio_driver); | ||
243 | } | ||
244 | |||
245 | static void fs_enet_mdio_fec_exit(void) | ||
246 | { | ||
247 | platform_driver_unregister(&fs_enet_fec_mdio_driver); | ||
248 | } | ||
249 | |||
250 | module_init(fs_enet_mdio_fec_init); | ||
251 | module_exit(fs_enet_mdio_fec_exit); | ||
diff --git a/drivers/net/ethernet/freescale/fsl_pq_mdio.c b/drivers/net/ethernet/freescale/fsl_pq_mdio.c index 8dee1aed47e4..f1096027b186 100644 --- a/drivers/net/ethernet/freescale/fsl_pq_mdio.c +++ b/drivers/net/ethernet/freescale/fsl_pq_mdio.c | |||
@@ -443,15 +443,6 @@ static struct platform_driver fsl_pq_mdio_driver = { | |||
443 | .remove = fsl_pq_mdio_remove, | 443 | .remove = fsl_pq_mdio_remove, |
444 | }; | 444 | }; |
445 | 445 | ||
446 | int __init fsl_pq_mdio_init(void) | 446 | module_platform_driver(fsl_pq_mdio_driver); |
447 | { | ||
448 | return platform_driver_register(&fsl_pq_mdio_driver); | ||
449 | } | ||
450 | module_init(fsl_pq_mdio_init); | ||
451 | 447 | ||
452 | void fsl_pq_mdio_exit(void) | ||
453 | { | ||
454 | platform_driver_unregister(&fsl_pq_mdio_driver); | ||
455 | } | ||
456 | module_exit(fsl_pq_mdio_exit); | ||
457 | MODULE_LICENSE("GPL"); | 448 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 8e21ceb3b7da..e01cdaa722a9 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c | |||
@@ -3281,16 +3281,4 @@ static struct platform_driver gfar_driver = { | |||
3281 | .remove = gfar_remove, | 3281 | .remove = gfar_remove, |
3282 | }; | 3282 | }; |
3283 | 3283 | ||
3284 | static int __init gfar_init(void) | 3284 | module_platform_driver(gfar_driver); |
3285 | { | ||
3286 | return platform_driver_register(&gfar_driver); | ||
3287 | } | ||
3288 | |||
3289 | static void __exit gfar_exit(void) | ||
3290 | { | ||
3291 | platform_driver_unregister(&gfar_driver); | ||
3292 | } | ||
3293 | |||
3294 | module_init(gfar_init); | ||
3295 | module_exit(gfar_exit); | ||
3296 | |||
diff --git a/drivers/net/ethernet/freescale/gianfar_ptp.c b/drivers/net/ethernet/freescale/gianfar_ptp.c index f67b8aebc89c..83e0ed757e33 100644 --- a/drivers/net/ethernet/freescale/gianfar_ptp.c +++ b/drivers/net/ethernet/freescale/gianfar_ptp.c | |||
@@ -562,21 +562,7 @@ static struct platform_driver gianfar_ptp_driver = { | |||
562 | .remove = gianfar_ptp_remove, | 562 | .remove = gianfar_ptp_remove, |
563 | }; | 563 | }; |
564 | 564 | ||
565 | /* module operations */ | 565 | module_platform_driver(gianfar_ptp_driver); |
566 | |||
567 | static int __init ptp_gianfar_init(void) | ||
568 | { | ||
569 | return platform_driver_register(&gianfar_ptp_driver); | ||
570 | } | ||
571 | |||
572 | module_init(ptp_gianfar_init); | ||
573 | |||
574 | static void __exit ptp_gianfar_exit(void) | ||
575 | { | ||
576 | platform_driver_unregister(&gianfar_ptp_driver); | ||
577 | } | ||
578 | |||
579 | module_exit(ptp_gianfar_exit); | ||
580 | 566 | ||
581 | MODULE_AUTHOR("Richard Cochran <richard.cochran@omicron.at>"); | 567 | MODULE_AUTHOR("Richard Cochran <richard.cochran@omicron.at>"); |
582 | MODULE_DESCRIPTION("PTP clock using the eTSEC"); | 568 | MODULE_DESCRIPTION("PTP clock using the eTSEC"); |
diff --git a/drivers/net/ethernet/korina.c b/drivers/net/ethernet/korina.c index d8430f487b84..6ad094f176f8 100644 --- a/drivers/net/ethernet/korina.c +++ b/drivers/net/ethernet/korina.c | |||
@@ -1230,18 +1230,7 @@ static struct platform_driver korina_driver = { | |||
1230 | .remove = korina_remove, | 1230 | .remove = korina_remove, |
1231 | }; | 1231 | }; |
1232 | 1232 | ||
1233 | static int __init korina_init_module(void) | 1233 | module_platform_driver(korina_driver); |
1234 | { | ||
1235 | return platform_driver_register(&korina_driver); | ||
1236 | } | ||
1237 | |||
1238 | static void korina_cleanup_module(void) | ||
1239 | { | ||
1240 | return platform_driver_unregister(&korina_driver); | ||
1241 | } | ||
1242 | |||
1243 | module_init(korina_init_module); | ||
1244 | module_exit(korina_cleanup_module); | ||
1245 | 1234 | ||
1246 | MODULE_AUTHOR("Philip Rischel <rischelp@idt.com>"); | 1235 | MODULE_AUTHOR("Philip Rischel <rischelp@idt.com>"); |
1247 | MODULE_AUTHOR("Felix Fietkau <nbd@openwrt.org>"); | 1236 | MODULE_AUTHOR("Felix Fietkau <nbd@openwrt.org>"); |
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c index d17d0624c5e6..5ec409e3da09 100644 --- a/drivers/net/ethernet/marvell/pxa168_eth.c +++ b/drivers/net/ethernet/marvell/pxa168_eth.c | |||
@@ -1645,18 +1645,7 @@ static struct platform_driver pxa168_eth_driver = { | |||
1645 | }, | 1645 | }, |
1646 | }; | 1646 | }; |
1647 | 1647 | ||
1648 | static int __init pxa168_init_module(void) | 1648 | module_platform_driver(pxa168_eth_driver); |
1649 | { | ||
1650 | return platform_driver_register(&pxa168_eth_driver); | ||
1651 | } | ||
1652 | |||
1653 | static void __exit pxa168_cleanup_module(void) | ||
1654 | { | ||
1655 | platform_driver_unregister(&pxa168_eth_driver); | ||
1656 | } | ||
1657 | |||
1658 | module_init(pxa168_init_module); | ||
1659 | module_exit(pxa168_cleanup_module); | ||
1660 | 1649 | ||
1661 | MODULE_LICENSE("GPL"); | 1650 | MODULE_LICENSE("GPL"); |
1662 | MODULE_DESCRIPTION("Ethernet driver for Marvell PXA168"); | 1651 | MODULE_DESCRIPTION("Ethernet driver for Marvell PXA168"); |
diff --git a/drivers/net/ethernet/micrel/ks8842.c b/drivers/net/ethernet/micrel/ks8842.c index 4a6ae057e3b1..75ec87a822b8 100644 --- a/drivers/net/ethernet/micrel/ks8842.c +++ b/drivers/net/ethernet/micrel/ks8842.c | |||
@@ -1264,18 +1264,7 @@ static struct platform_driver ks8842_platform_driver = { | |||
1264 | .remove = ks8842_remove, | 1264 | .remove = ks8842_remove, |
1265 | }; | 1265 | }; |
1266 | 1266 | ||
1267 | static int __init ks8842_init(void) | 1267 | module_platform_driver(ks8842_platform_driver); |
1268 | { | ||
1269 | return platform_driver_register(&ks8842_platform_driver); | ||
1270 | } | ||
1271 | |||
1272 | static void __exit ks8842_exit(void) | ||
1273 | { | ||
1274 | platform_driver_unregister(&ks8842_platform_driver); | ||
1275 | } | ||
1276 | |||
1277 | module_init(ks8842_init); | ||
1278 | module_exit(ks8842_exit); | ||
1279 | 1268 | ||
1280 | MODULE_DESCRIPTION("Timberdale KS8842 ethernet driver"); | 1269 | MODULE_DESCRIPTION("Timberdale KS8842 ethernet driver"); |
1281 | MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>"); | 1270 | MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>"); |
diff --git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index 228c5c0b50de..e58e78e5c930 100644 --- a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c | |||
@@ -1658,18 +1658,7 @@ static struct platform_driver ks8851_platform_driver = { | |||
1658 | .remove = __devexit_p(ks8851_remove), | 1658 | .remove = __devexit_p(ks8851_remove), |
1659 | }; | 1659 | }; |
1660 | 1660 | ||
1661 | static int __init ks8851_init(void) | 1661 | module_platform_driver(ks8851_platform_driver); |
1662 | { | ||
1663 | return platform_driver_register(&ks8851_platform_driver); | ||
1664 | } | ||
1665 | |||
1666 | static void __exit ks8851_exit(void) | ||
1667 | { | ||
1668 | platform_driver_unregister(&ks8851_platform_driver); | ||
1669 | } | ||
1670 | |||
1671 | module_init(ks8851_init); | ||
1672 | module_exit(ks8851_exit); | ||
1673 | 1662 | ||
1674 | MODULE_DESCRIPTION("KS8851 MLL Network driver"); | 1663 | MODULE_DESCRIPTION("KS8851 MLL Network driver"); |
1675 | MODULE_AUTHOR("David Choi <david.choi@micrel.com>"); | 1664 | MODULE_AUTHOR("David Choi <david.choi@micrel.com>"); |
diff --git a/drivers/net/ethernet/natsemi/jazzsonic.c b/drivers/net/ethernet/natsemi/jazzsonic.c index fc7c6a932ad9..5b89fd377ae3 100644 --- a/drivers/net/ethernet/natsemi/jazzsonic.c +++ b/drivers/net/ethernet/natsemi/jazzsonic.c | |||
@@ -294,15 +294,4 @@ static struct platform_driver jazz_sonic_driver = { | |||
294 | }, | 294 | }, |
295 | }; | 295 | }; |
296 | 296 | ||
297 | static int __init jazz_sonic_init_module(void) | 297 | module_platform_driver(jazz_sonic_driver); |
298 | { | ||
299 | return platform_driver_register(&jazz_sonic_driver); | ||
300 | } | ||
301 | |||
302 | static void __exit jazz_sonic_cleanup_module(void) | ||
303 | { | ||
304 | platform_driver_unregister(&jazz_sonic_driver); | ||
305 | } | ||
306 | |||
307 | module_init(jazz_sonic_init_module); | ||
308 | module_exit(jazz_sonic_cleanup_module); | ||
diff --git a/drivers/net/ethernet/natsemi/macsonic.c b/drivers/net/ethernet/natsemi/macsonic.c index a2eacbfb4252..70367d76fc8d 100644 --- a/drivers/net/ethernet/natsemi/macsonic.c +++ b/drivers/net/ethernet/natsemi/macsonic.c | |||
@@ -643,15 +643,4 @@ static struct platform_driver mac_sonic_driver = { | |||
643 | }, | 643 | }, |
644 | }; | 644 | }; |
645 | 645 | ||
646 | static int __init mac_sonic_init_module(void) | 646 | module_platform_driver(mac_sonic_driver); |
647 | { | ||
648 | return platform_driver_register(&mac_sonic_driver); | ||
649 | } | ||
650 | |||
651 | static void __exit mac_sonic_cleanup_module(void) | ||
652 | { | ||
653 | platform_driver_unregister(&mac_sonic_driver); | ||
654 | } | ||
655 | |||
656 | module_init(mac_sonic_init_module); | ||
657 | module_exit(mac_sonic_cleanup_module); | ||
diff --git a/drivers/net/ethernet/natsemi/xtsonic.c b/drivers/net/ethernet/natsemi/xtsonic.c index ccf61b9da8d1..e01c0a07a93a 100644 --- a/drivers/net/ethernet/natsemi/xtsonic.c +++ b/drivers/net/ethernet/natsemi/xtsonic.c | |||
@@ -319,15 +319,4 @@ static struct platform_driver xtsonic_driver = { | |||
319 | }, | 319 | }, |
320 | }; | 320 | }; |
321 | 321 | ||
322 | static int __init xtsonic_init(void) | 322 | module_platform_driver(xtsonic_driver); |
323 | { | ||
324 | return platform_driver_register(&xtsonic_driver); | ||
325 | } | ||
326 | |||
327 | static void __exit xtsonic_cleanup(void) | ||
328 | { | ||
329 | platform_driver_unregister(&xtsonic_driver); | ||
330 | } | ||
331 | |||
332 | module_init(xtsonic_init); | ||
333 | module_exit(xtsonic_cleanup); | ||
diff --git a/drivers/net/ethernet/nuvoton/w90p910_ether.c b/drivers/net/ethernet/nuvoton/w90p910_ether.c index f1bfb8f8fcf0..b75a0497d58d 100644 --- a/drivers/net/ethernet/nuvoton/w90p910_ether.c +++ b/drivers/net/ethernet/nuvoton/w90p910_ether.c | |||
@@ -1103,18 +1103,7 @@ static struct platform_driver w90p910_ether_driver = { | |||
1103 | }, | 1103 | }, |
1104 | }; | 1104 | }; |
1105 | 1105 | ||
1106 | static int __init w90p910_ether_init(void) | 1106 | module_platform_driver(w90p910_ether_driver); |
1107 | { | ||
1108 | return platform_driver_register(&w90p910_ether_driver); | ||
1109 | } | ||
1110 | |||
1111 | static void __exit w90p910_ether_exit(void) | ||
1112 | { | ||
1113 | platform_driver_unregister(&w90p910_ether_driver); | ||
1114 | } | ||
1115 | |||
1116 | module_init(w90p910_ether_init); | ||
1117 | module_exit(w90p910_ether_exit); | ||
1118 | 1107 | ||
1119 | MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); | 1108 | MODULE_AUTHOR("Wan ZongShun <mcuos.com@gmail.com>"); |
1120 | MODULE_DESCRIPTION("w90p910 MAC driver!"); | 1109 | MODULE_DESCRIPTION("w90p910 MAC driver!"); |
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 9b230740c6ab..ebfb682dfe55 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c | |||
@@ -1957,18 +1957,7 @@ static struct platform_driver sh_eth_driver = { | |||
1957 | }, | 1957 | }, |
1958 | }; | 1958 | }; |
1959 | 1959 | ||
1960 | static int __init sh_eth_init(void) | 1960 | module_platform_driver(sh_eth_driver); |
1961 | { | ||
1962 | return platform_driver_register(&sh_eth_driver); | ||
1963 | } | ||
1964 | |||
1965 | static void __exit sh_eth_cleanup(void) | ||
1966 | { | ||
1967 | platform_driver_unregister(&sh_eth_driver); | ||
1968 | } | ||
1969 | |||
1970 | module_init(sh_eth_init); | ||
1971 | module_exit(sh_eth_cleanup); | ||
1972 | 1961 | ||
1973 | MODULE_AUTHOR("Nobuhiro Iwamatsu, Yoshihiro Shimoda"); | 1962 | MODULE_AUTHOR("Nobuhiro Iwamatsu, Yoshihiro Shimoda"); |
1974 | MODULE_DESCRIPTION("Renesas SuperH Ethernet driver"); | 1963 | MODULE_DESCRIPTION("Renesas SuperH Ethernet driver"); |
diff --git a/drivers/net/ethernet/seeq/sgiseeq.c b/drivers/net/ethernet/seeq/sgiseeq.c index c3673f151a41..f955a19eb22f 100644 --- a/drivers/net/ethernet/seeq/sgiseeq.c +++ b/drivers/net/ethernet/seeq/sgiseeq.c | |||
@@ -834,23 +834,7 @@ static struct platform_driver sgiseeq_driver = { | |||
834 | } | 834 | } |
835 | }; | 835 | }; |
836 | 836 | ||
837 | static int __init sgiseeq_module_init(void) | 837 | module_platform_driver(sgiseeq_driver); |
838 | { | ||
839 | if (platform_driver_register(&sgiseeq_driver)) { | ||
840 | printk(KERN_ERR "Driver registration failed\n"); | ||
841 | return -ENODEV; | ||
842 | } | ||
843 | |||
844 | return 0; | ||
845 | } | ||
846 | |||
847 | static void __exit sgiseeq_module_exit(void) | ||
848 | { | ||
849 | platform_driver_unregister(&sgiseeq_driver); | ||
850 | } | ||
851 | |||
852 | module_init(sgiseeq_module_init); | ||
853 | module_exit(sgiseeq_module_exit); | ||
854 | 838 | ||
855 | MODULE_DESCRIPTION("SGI Seeq 8003 driver"); | 839 | MODULE_DESCRIPTION("SGI Seeq 8003 driver"); |
856 | MODULE_AUTHOR("Linux/MIPS Mailing List <linux-mips@linux-mips.org>"); | 840 | MODULE_AUTHOR("Linux/MIPS Mailing List <linux-mips@linux-mips.org>"); |
diff --git a/drivers/net/ethernet/sgi/meth.c b/drivers/net/ethernet/sgi/meth.c index 60135aa55802..f98c6c6eedcd 100644 --- a/drivers/net/ethernet/sgi/meth.c +++ b/drivers/net/ethernet/sgi/meth.c | |||
@@ -830,24 +830,7 @@ static struct platform_driver meth_driver = { | |||
830 | } | 830 | } |
831 | }; | 831 | }; |
832 | 832 | ||
833 | static int __init meth_init_module(void) | 833 | module_platform_driver(meth_driver); |
834 | { | ||
835 | int err; | ||
836 | |||
837 | err = platform_driver_register(&meth_driver); | ||
838 | if (err) | ||
839 | printk(KERN_ERR "Driver registration failed\n"); | ||
840 | |||
841 | return err; | ||
842 | } | ||
843 | |||
844 | static void __exit meth_exit_module(void) | ||
845 | { | ||
846 | platform_driver_unregister(&meth_driver); | ||
847 | } | ||
848 | |||
849 | module_init(meth_init_module); | ||
850 | module_exit(meth_exit_module); | ||
851 | 834 | ||
852 | MODULE_AUTHOR("Ilya Volynets <ilya@theIlya.com>"); | 835 | MODULE_AUTHOR("Ilya Volynets <ilya@theIlya.com>"); |
853 | MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver"); | 836 | MODULE_DESCRIPTION("SGI O2 Builtin Fast Ethernet driver"); |
diff --git a/drivers/net/ethernet/smsc/smc911x.c b/drivers/net/ethernet/smsc/smc911x.c index 8f61fe9db1d0..313ba3b32ab4 100644 --- a/drivers/net/ethernet/smsc/smc911x.c +++ b/drivers/net/ethernet/smsc/smc911x.c | |||
@@ -2196,15 +2196,4 @@ static struct platform_driver smc911x_driver = { | |||
2196 | }, | 2196 | }, |
2197 | }; | 2197 | }; |
2198 | 2198 | ||
2199 | static int __init smc911x_init(void) | 2199 | module_platform_driver(smc911x_driver); |
2200 | { | ||
2201 | return platform_driver_register(&smc911x_driver); | ||
2202 | } | ||
2203 | |||
2204 | static void __exit smc911x_cleanup(void) | ||
2205 | { | ||
2206 | platform_driver_unregister(&smc911x_driver); | ||
2207 | } | ||
2208 | |||
2209 | module_init(smc911x_init); | ||
2210 | module_exit(smc911x_cleanup); | ||
diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c index f47f81e25322..64ad3ed74495 100644 --- a/drivers/net/ethernet/smsc/smc91x.c +++ b/drivers/net/ethernet/smsc/smc91x.c | |||
@@ -2417,15 +2417,4 @@ static struct platform_driver smc_driver = { | |||
2417 | }, | 2417 | }, |
2418 | }; | 2418 | }; |
2419 | 2419 | ||
2420 | static int __init smc_init(void) | 2420 | module_platform_driver(smc_driver); |
2421 | { | ||
2422 | return platform_driver_register(&smc_driver); | ||
2423 | } | ||
2424 | |||
2425 | static void __exit smc_cleanup(void) | ||
2426 | { | ||
2427 | platform_driver_unregister(&smc_driver); | ||
2428 | } | ||
2429 | |||
2430 | module_init(smc_init); | ||
2431 | module_exit(smc_cleanup); | ||
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 20e8267e8e40..24c2bf697118 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -2131,27 +2131,6 @@ static struct platform_driver stmmac_driver = { | |||
2131 | }, | 2131 | }, |
2132 | }; | 2132 | }; |
2133 | 2133 | ||
2134 | /** | ||
2135 | * stmmac_init_module - Entry point for the driver | ||
2136 | * Description: This function is the entry point for the driver. | ||
2137 | */ | ||
2138 | static int __init stmmac_init_module(void) | ||
2139 | { | ||
2140 | int ret; | ||
2141 | |||
2142 | ret = platform_driver_register(&stmmac_driver); | ||
2143 | return ret; | ||
2144 | } | ||
2145 | |||
2146 | /** | ||
2147 | * stmmac_cleanup_module - Cleanup routine for the driver | ||
2148 | * Description: This function is the cleanup routine for the driver. | ||
2149 | */ | ||
2150 | static void __exit stmmac_cleanup_module(void) | ||
2151 | { | ||
2152 | platform_driver_unregister(&stmmac_driver); | ||
2153 | } | ||
2154 | |||
2155 | #ifndef MODULE | 2134 | #ifndef MODULE |
2156 | static int __init stmmac_cmdline_opt(char *str) | 2135 | static int __init stmmac_cmdline_opt(char *str) |
2157 | { | 2136 | { |
@@ -2211,8 +2190,7 @@ err: | |||
2211 | __setup("stmmaceth=", stmmac_cmdline_opt); | 2190 | __setup("stmmaceth=", stmmac_cmdline_opt); |
2212 | #endif | 2191 | #endif |
2213 | 2192 | ||
2214 | module_init(stmmac_init_module); | 2193 | module_platform_driver(stmmac_driver); |
2215 | module_exit(stmmac_cleanup_module); | ||
2216 | 2194 | ||
2217 | MODULE_DESCRIPTION("STMMAC 10/100/1000 Ethernet driver"); | 2195 | MODULE_DESCRIPTION("STMMAC 10/100/1000 Ethernet driver"); |
2218 | MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>"); | 2196 | MODULE_AUTHOR("Giuseppe Cavallaro <peppe.cavallaro@st.com>"); |
diff --git a/drivers/net/ethernet/sun/sunbmac.c b/drivers/net/ethernet/sun/sunbmac.c index 0d8cfd9ea053..220f724c3377 100644 --- a/drivers/net/ethernet/sun/sunbmac.c +++ b/drivers/net/ethernet/sun/sunbmac.c | |||
@@ -1293,15 +1293,4 @@ static struct platform_driver bigmac_sbus_driver = { | |||
1293 | .remove = __devexit_p(bigmac_sbus_remove), | 1293 | .remove = __devexit_p(bigmac_sbus_remove), |
1294 | }; | 1294 | }; |
1295 | 1295 | ||
1296 | static int __init bigmac_init(void) | 1296 | module_platform_driver(bigmac_sbus_driver); |
1297 | { | ||
1298 | return platform_driver_register(&bigmac_sbus_driver); | ||
1299 | } | ||
1300 | |||
1301 | static void __exit bigmac_exit(void) | ||
1302 | { | ||
1303 | platform_driver_unregister(&bigmac_sbus_driver); | ||
1304 | } | ||
1305 | |||
1306 | module_init(bigmac_init); | ||
1307 | module_exit(bigmac_exit); | ||
diff --git a/drivers/net/ethernet/tundra/tsi108_eth.c b/drivers/net/ethernet/tundra/tsi108_eth.c index a8df7eca0956..a9ce01bafd20 100644 --- a/drivers/net/ethernet/tundra/tsi108_eth.c +++ b/drivers/net/ethernet/tundra/tsi108_eth.c | |||
@@ -1688,18 +1688,6 @@ static void tsi108_timed_checker(unsigned long dev_ptr) | |||
1688 | mod_timer(&data->timer, jiffies + CHECK_PHY_INTERVAL); | 1688 | mod_timer(&data->timer, jiffies + CHECK_PHY_INTERVAL); |
1689 | } | 1689 | } |
1690 | 1690 | ||
1691 | static int tsi108_ether_init(void) | ||
1692 | { | ||
1693 | int ret; | ||
1694 | ret = platform_driver_register (&tsi_eth_driver); | ||
1695 | if (ret < 0){ | ||
1696 | printk("tsi108_ether_init: error initializing ethernet " | ||
1697 | "device\n"); | ||
1698 | return ret; | ||
1699 | } | ||
1700 | return 0; | ||
1701 | } | ||
1702 | |||
1703 | static int tsi108_ether_remove(struct platform_device *pdev) | 1691 | static int tsi108_ether_remove(struct platform_device *pdev) |
1704 | { | 1692 | { |
1705 | struct net_device *dev = platform_get_drvdata(pdev); | 1693 | struct net_device *dev = platform_get_drvdata(pdev); |
@@ -1714,13 +1702,7 @@ static int tsi108_ether_remove(struct platform_device *pdev) | |||
1714 | 1702 | ||
1715 | return 0; | 1703 | return 0; |
1716 | } | 1704 | } |
1717 | static void tsi108_ether_exit(void) | 1705 | module_platform_driver(tsi_eth_driver); |
1718 | { | ||
1719 | platform_driver_unregister(&tsi_eth_driver); | ||
1720 | } | ||
1721 | |||
1722 | module_init(tsi108_ether_init); | ||
1723 | module_exit(tsi108_ether_exit); | ||
1724 | 1706 | ||
1725 | MODULE_AUTHOR("Tundra Semiconductor Corporation"); | 1707 | MODULE_AUTHOR("Tundra Semiconductor Corporation"); |
1726 | MODULE_DESCRIPTION("Tsi108 Gigabit Ethernet driver"); | 1708 | MODULE_DESCRIPTION("Tsi108 Gigabit Ethernet driver"); |
diff --git a/drivers/net/ethernet/xilinx/ll_temac_main.c b/drivers/net/ethernet/xilinx/ll_temac_main.c index 1ade9e18d299..282330d9801b 100644 --- a/drivers/net/ethernet/xilinx/ll_temac_main.c +++ b/drivers/net/ethernet/xilinx/ll_temac_main.c | |||
@@ -1181,17 +1181,7 @@ static struct platform_driver temac_of_driver = { | |||
1181 | }, | 1181 | }, |
1182 | }; | 1182 | }; |
1183 | 1183 | ||
1184 | static int __init temac_init(void) | 1184 | module_platform_driver(temac_of_driver); |
1185 | { | ||
1186 | return platform_driver_register(&temac_of_driver); | ||
1187 | } | ||
1188 | module_init(temac_init); | ||
1189 | |||
1190 | static void __exit temac_exit(void) | ||
1191 | { | ||
1192 | platform_driver_unregister(&temac_of_driver); | ||
1193 | } | ||
1194 | module_exit(temac_exit); | ||
1195 | 1185 | ||
1196 | MODULE_DESCRIPTION("Xilinx LL_TEMAC Ethernet driver"); | 1186 | MODULE_DESCRIPTION("Xilinx LL_TEMAC Ethernet driver"); |
1197 | MODULE_AUTHOR("Yoshio Kashiwagi"); | 1187 | MODULE_AUTHOR("Yoshio Kashiwagi"); |
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c index 8018d7d045b0..dca65410bfc5 100644 --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c | |||
@@ -1303,27 +1303,7 @@ static struct platform_driver xemaclite_of_driver = { | |||
1303 | .remove = __devexit_p(xemaclite_of_remove), | 1303 | .remove = __devexit_p(xemaclite_of_remove), |
1304 | }; | 1304 | }; |
1305 | 1305 | ||
1306 | /** | 1306 | module_platform_driver(xemaclite_of_driver); |
1307 | * xgpiopss_init - Initial driver registration call | ||
1308 | * | ||
1309 | * Return: 0 upon success, or a negative error upon failure. | ||
1310 | */ | ||
1311 | static int __init xemaclite_init(void) | ||
1312 | { | ||
1313 | /* No kernel boot options used, we just need to register the driver */ | ||
1314 | return platform_driver_register(&xemaclite_of_driver); | ||
1315 | } | ||
1316 | |||
1317 | /** | ||
1318 | * xemaclite_cleanup - Driver un-registration call | ||
1319 | */ | ||
1320 | static void __exit xemaclite_cleanup(void) | ||
1321 | { | ||
1322 | platform_driver_unregister(&xemaclite_of_driver); | ||
1323 | } | ||
1324 | |||
1325 | module_init(xemaclite_init); | ||
1326 | module_exit(xemaclite_cleanup); | ||
1327 | 1307 | ||
1328 | MODULE_AUTHOR("Xilinx, Inc."); | 1308 | MODULE_AUTHOR("Xilinx, Inc."); |
1329 | MODULE_DESCRIPTION("Xilinx Ethernet MAC Lite driver"); | 1309 | MODULE_DESCRIPTION("Xilinx Ethernet MAC Lite driver"); |