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/ethernet/smsc | |
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/ethernet/smsc')
-rw-r--r-- | drivers/net/ethernet/smsc/smc911x.c | 13 | ||||
-rw-r--r-- | drivers/net/ethernet/smsc/smc91x.c | 13 |
2 files changed, 2 insertions, 24 deletions
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); | ||