aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-13 14:41:21 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-14 15:20:04 -0400
commiteff98db027c50f1e4ad14f1d9069d55e5f7e4319 (patch)
tree6688b906abe22d29ff83ac0ac89150fcc80d0abe
parenta680b30a53668e299d487117ded7b76a069abc77 (diff)
net/wan: use module_pci_driver
This patch converts the drivers in drivers/net/wan/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/wan/dscc4.c13
-rw-r--r--drivers/net/wan/lmc/lmc_main.c13
2 files changed, 2 insertions, 24 deletions
diff --git a/drivers/net/wan/dscc4.c b/drivers/net/wan/dscc4.c
index c676de7de024..9eb6479306d6 100644
--- a/drivers/net/wan/dscc4.c
+++ b/drivers/net/wan/dscc4.c
@@ -2055,15 +2055,4 @@ static struct pci_driver dscc4_driver = {
2055 .remove = __devexit_p(dscc4_remove_one), 2055 .remove = __devexit_p(dscc4_remove_one),
2056}; 2056};
2057 2057
2058static int __init dscc4_init_module(void) 2058module_pci_driver(dscc4_driver);
2059{
2060 return pci_register_driver(&dscc4_driver);
2061}
2062
2063static void __exit dscc4_cleanup_module(void)
2064{
2065 pci_unregister_driver(&dscc4_driver);
2066}
2067
2068module_init(dscc4_init_module);
2069module_exit(dscc4_cleanup_module);
diff --git a/drivers/net/wan/lmc/lmc_main.c b/drivers/net/wan/lmc/lmc_main.c
index 76a8a4a522e9..b8da30ad33ba 100644
--- a/drivers/net/wan/lmc/lmc_main.c
+++ b/drivers/net/wan/lmc/lmc_main.c
@@ -1736,18 +1736,7 @@ static struct pci_driver lmc_driver = {
1736 .remove = __devexit_p(lmc_remove_one), 1736 .remove = __devexit_p(lmc_remove_one),
1737}; 1737};
1738 1738
1739static int __init init_lmc(void) 1739module_pci_driver(lmc_driver);
1740{
1741 return pci_register_driver(&lmc_driver);
1742}
1743
1744static void __exit exit_lmc(void)
1745{
1746 pci_unregister_driver(&lmc_driver);
1747}
1748
1749module_init(init_lmc);
1750module_exit(exit_lmc);
1751 1740
1752unsigned lmc_mii_readreg (lmc_softc_t * const sc, unsigned devaddr, unsigned regno) /*fold00*/ 1741unsigned lmc_mii_readreg (lmc_softc_t * const sc, unsigned devaddr, unsigned regno) /*fold00*/
1753{ 1742{