drivers/net: use module_pcmcia_driver() in pcmcia drivers
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 6 Mar 2013 18:27:43 +0000 (11:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 19:27:33 +0000 (12:27 -0700)
Use the new module_pcmcia_driver() macro to remove the boilerplate
module init/exit code in the pcmcia drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19 files changed:
drivers/net/arcnet/com20020_cs.c
drivers/net/can/sja1000/ems_pcmcia.c
drivers/net/can/sja1000/peak_pcmcia.c
drivers/net/ethernet/3com/3c574_cs.c
drivers/net/ethernet/3com/3c589_cs.c
drivers/net/ethernet/8390/axnet_cs.c
drivers/net/ethernet/8390/pcnet_cs.c
drivers/net/ethernet/amd/nmclan_cs.c
drivers/net/ethernet/fujitsu/fmvj18x_cs.c
drivers/net/ethernet/smsc/smc91c92_cs.c
drivers/net/ethernet/xircom/xirc2ps_cs.c
drivers/net/wireless/airo_cs.c
drivers/net/wireless/atmel_cs.c
drivers/net/wireless/b43/pcmcia.c
drivers/net/wireless/hostap/hostap_cs.c
drivers/net/wireless/libertas/if_cs.c
drivers/net/wireless/orinoco/orinoco_cs.c
drivers/net/wireless/orinoco/spectrum_cs.c
drivers/net/wireless/wl3501_cs.c

index 5bed4c4e25084fad1d3e2607cc95a03446e1a380..74dc1875f9cd189d7ad29f81d6e5ca210cd1e477 100644 (file)
@@ -333,16 +333,4 @@ static struct pcmcia_driver com20020_cs_driver = {
        .suspend        = com20020_suspend,
        .resume         = com20020_resume,
 };
-
-static int __init init_com20020_cs(void)
-{
-       return pcmcia_register_driver(&com20020_cs_driver);
-}
-
-static void __exit exit_com20020_cs(void)
-{
-       pcmcia_unregister_driver(&com20020_cs_driver);
-}
-
-module_init(init_com20020_cs);
-module_exit(exit_com20020_cs);
+module_pcmcia_driver(com20020_cs_driver);
index 5c2f3fbbf5ae8fc4028ecf0fdc50ac03e92fd21b..321c27e1c7fc160196ca5caa8152fb05634ecc70 100644 (file)
@@ -316,15 +316,4 @@ static struct pcmcia_driver ems_pcmcia_driver = {
        .remove = ems_pcmcia_remove,
        .id_table = ems_pcmcia_tbl,
 };
-
-static int __init ems_pcmcia_init(void)
-{
-       return pcmcia_register_driver(&ems_pcmcia_driver);
-}
-module_init(ems_pcmcia_init);
-
-static void __exit ems_pcmcia_exit(void)
-{
-       pcmcia_unregister_driver(&ems_pcmcia_driver);
-}
-module_exit(ems_pcmcia_exit);
+module_pcmcia_driver(ems_pcmcia_driver);
index 1a7020ba37f5416435f6e8e1475772ec33b5d0db..0a707f70661c7ca24d84bb165aef274654a4c56a 100644 (file)
@@ -740,15 +740,4 @@ static struct pcmcia_driver pcan_driver = {
        .remove = pcan_remove,
        .id_table = pcan_table,
 };
-
-static int __init pcan_init(void)
-{
-       return pcmcia_register_driver(&pcan_driver);
-}
-module_init(pcan_init);
-
-static void __exit pcan_exit(void)
-{
-       pcmcia_unregister_driver(&pcan_driver);
-}
-module_exit(pcan_exit);
+module_pcmcia_driver(pcan_driver);
index ffd8de28a76ad2c69a96daab3c59dbe29127faa1..6fc994fa4abedbc1f6264ff5e4177ee6db72265e 100644 (file)
@@ -1165,16 +1165,4 @@ static struct pcmcia_driver tc574_driver = {
        .suspend        = tc574_suspend,
        .resume         = tc574_resume,
 };
-
-static int __init init_tc574(void)
-{
-       return pcmcia_register_driver(&tc574_driver);
-}
-
-static void __exit exit_tc574(void)
-{
-       pcmcia_unregister_driver(&tc574_driver);
-}
-
-module_init(init_tc574);
-module_exit(exit_tc574);
+module_pcmcia_driver(tc574_driver);
index a556c01e011b1cf8521b83186c66dd0741c4ee4d..078480aaa1684d4ad9c3d55fac2e2a7f50be7eeb 100644 (file)
@@ -928,16 +928,4 @@ static struct pcmcia_driver tc589_driver = {
        .suspend        = tc589_suspend,
        .resume         = tc589_resume,
 };
-
-static int __init init_tc589(void)
-{
-       return pcmcia_register_driver(&tc589_driver);
-}
-
-static void __exit exit_tc589(void)
-{
-       pcmcia_unregister_driver(&tc589_driver);
-}
-
-module_init(init_tc589);
-module_exit(exit_tc589);
+module_pcmcia_driver(tc589_driver);
index e1b3941bd14948e74b9c3b9b0684c01e06104f88..d801c1410fb04186316d46c3ae90afef2e3b3149 100644 (file)
@@ -728,19 +728,7 @@ static struct pcmcia_driver axnet_cs_driver = {
        .suspend        = axnet_suspend,
        .resume         = axnet_resume,
 };
-
-static int __init init_axnet_cs(void)
-{
-       return pcmcia_register_driver(&axnet_cs_driver);
-}
-
-static void __exit exit_axnet_cs(void)
-{
-       pcmcia_unregister_driver(&axnet_cs_driver);
-}
-
-module_init(init_axnet_cs);
-module_exit(exit_axnet_cs);
+module_pcmcia_driver(axnet_cs_driver);
 
 /*====================================================================*/
 
index de1af0bfed4c1687f7ddf0ea24fbc37a2bb62087..46c5aadaca8efb50f6701e8e9be3aff615dd5846 100644 (file)
@@ -1694,16 +1694,4 @@ static struct pcmcia_driver pcnet_driver = {
        .suspend        = pcnet_suspend,
        .resume         = pcnet_resume,
 };
-
-static int __init init_pcnet_cs(void)
-{
-    return pcmcia_register_driver(&pcnet_driver);
-}
-
-static void __exit exit_pcnet_cs(void)
-{
-    pcmcia_unregister_driver(&pcnet_driver);
-}
-
-module_init(init_pcnet_cs);
-module_exit(exit_pcnet_cs);
+module_pcmcia_driver(pcnet_driver);
index 9f59bf63514b1151b0961975990f12ae14713e5e..d4ed89130c52f91bcec7463377a920462b3e238f 100644 (file)
@@ -1508,16 +1508,4 @@ static struct pcmcia_driver nmclan_cs_driver = {
        .suspend        = nmclan_suspend,
        .resume         = nmclan_resume,
 };
-
-static int __init init_nmclan_cs(void)
-{
-       return pcmcia_register_driver(&nmclan_cs_driver);
-}
-
-static void __exit exit_nmclan_cs(void)
-{
-       pcmcia_unregister_driver(&nmclan_cs_driver);
-}
-
-module_init(init_nmclan_cs);
-module_exit(exit_nmclan_cs);
+module_pcmcia_driver(nmclan_cs_driver);
index 2418faf2251aacc2e91877859ee185c95c251516..ab98b77df309bfc7274cce624002d6c9632ef56a 100644 (file)
@@ -705,19 +705,7 @@ static struct pcmcia_driver fmvj18x_cs_driver = {
        .suspend        = fmvj18x_suspend,
        .resume         = fmvj18x_resume,
 };
-
-static int __init init_fmvj18x_cs(void)
-{
-       return pcmcia_register_driver(&fmvj18x_cs_driver);
-}
-
-static void __exit exit_fmvj18x_cs(void)
-{
-       pcmcia_unregister_driver(&fmvj18x_cs_driver);
-}
-
-module_init(init_fmvj18x_cs);
-module_exit(exit_fmvj18x_cs);
+module_pcmcia_driver(fmvj18x_cs_driver);
 
 /*====================================================================*/
 
index 04393b5fef718c5a71877e8da9c6e351cf73823b..656d2e2ebfc9325c18e397f71074897dc43fc521 100644 (file)
@@ -2054,16 +2054,4 @@ static struct pcmcia_driver smc91c92_cs_driver = {
        .suspend        = smc91c92_suspend,
        .resume         = smc91c92_resume,
 };
-
-static int __init init_smc91c92_cs(void)
-{
-       return pcmcia_register_driver(&smc91c92_cs_driver);
-}
-
-static void __exit exit_smc91c92_cs(void)
-{
-       pcmcia_unregister_driver(&smc91c92_cs_driver);
-}
-
-module_init(init_smc91c92_cs);
-module_exit(exit_smc91c92_cs);
+module_pcmcia_driver(smc91c92_cs_driver);
index 98e09d0d3ce22e153603efc37f486dfdf55174ac..1025b4e937d249fe22eaf9c9f6e58aecfdc5ccf8 100644 (file)
@@ -1775,21 +1775,7 @@ static struct pcmcia_driver xirc2ps_cs_driver = {
        .suspend        = xirc2ps_suspend,
        .resume         = xirc2ps_resume,
 };
-
-static int __init
-init_xirc2ps_cs(void)
-{
-       return pcmcia_register_driver(&xirc2ps_cs_driver);
-}
-
-static void __exit
-exit_xirc2ps_cs(void)
-{
-       pcmcia_unregister_driver(&xirc2ps_cs_driver);
-}
-
-module_init(init_xirc2ps_cs);
-module_exit(exit_xirc2ps_cs);
+module_pcmcia_driver(xirc2ps_cs_driver);
 
 #ifndef MODULE
 static int __init setup_xirc2ps_cs(char *str)
index 956024a636e6d7868b2ddea67ee7efd0b8857816..14128fd265acd50cbf87b8d348cf014ce316a760 100644 (file)
@@ -180,16 +180,7 @@ static struct pcmcia_driver airo_driver = {
        .suspend        = airo_suspend,
        .resume         = airo_resume,
 };
-
-static int __init airo_cs_init(void)
-{
-       return pcmcia_register_driver(&airo_driver);
-}
-
-static void __exit airo_cs_cleanup(void)
-{
-       pcmcia_unregister_driver(&airo_driver);
-}
+module_pcmcia_driver(airo_driver);
 
 /*
     This program is free software; you can redistribute it and/or
@@ -229,6 +220,3 @@ static void __exit airo_cs_cleanup(void)
     IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     POSSIBILITY OF SUCH DAMAGE.
 */
-
-module_init(airo_cs_init);
-module_exit(airo_cs_cleanup);
index b42930f457c2cca4439da479b1ed162ee3e7106b..52257221921778300323389d94cb7e2f37f6e9ef 100644 (file)
@@ -245,16 +245,7 @@ static struct pcmcia_driver atmel_driver = {
        .suspend        = atmel_suspend,
        .resume         = atmel_resume,
 };
-
-static int __init atmel_cs_init(void)
-{
-        return pcmcia_register_driver(&atmel_driver);
-}
-
-static void __exit atmel_cs_cleanup(void)
-{
-        pcmcia_unregister_driver(&atmel_driver);
-}
+module_pcmcia_driver(atmel_driver);
 
 /*
     This program is free software; you can redistribute it and/or
@@ -294,6 +285,3 @@ static void __exit atmel_cs_cleanup(void)
     IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     POSSIBILITY OF SUCH DAMAGE.
 */
-
-module_init(atmel_cs_init);
-module_exit(atmel_cs_cleanup);
index f2ea2ceec8a97b6b6fb33819912a0923163d6065..55f2bd7f8f74f5a859eb5ed4b1891485cfa917c2 100644 (file)
@@ -130,6 +130,10 @@ static struct pcmcia_driver b43_pcmcia_driver = {
        .resume         = b43_pcmcia_resume,
 };
 
+/*
+ * These are not module init/exit functions!
+ * The module_pcmcia_driver() helper cannot be used here.
+ */
 int b43_pcmcia_init(void)
 {
        return pcmcia_register_driver(&b43_pcmcia_driver);
index 89e9d3a78c3c69fd849aea115b8ba3605d3e61de..56cd01ca8ad0b15394017a8f298760e769ed8043 100644 (file)
@@ -709,17 +709,4 @@ static struct pcmcia_driver hostap_driver = {
        .suspend        = hostap_cs_suspend,
        .resume         = hostap_cs_resume,
 };
-
-static int __init init_prism2_pccard(void)
-{
-       return pcmcia_register_driver(&hostap_driver);
-}
-
-static void __exit exit_prism2_pccard(void)
-{
-       pcmcia_unregister_driver(&hostap_driver);
-}
-
-
-module_init(init_prism2_pccard);
-module_exit(exit_prism2_pccard);
+module_pcmcia_driver(hostap_driver);
index 16beaf39dc534a167f4ee783ce913903fd174eb8..c94dd6802672a053d795b052710d5ada4ff3e2bb 100644 (file)
@@ -999,7 +999,6 @@ static const struct pcmcia_device_id if_cs_ids[] = {
 };
 MODULE_DEVICE_TABLE(pcmcia, if_cs_ids);
 
-
 static struct pcmcia_driver lbs_driver = {
        .owner          = THIS_MODULE,
        .name           = DRV_NAME,
@@ -1007,26 +1006,4 @@ static struct pcmcia_driver lbs_driver = {
        .remove         = if_cs_detach,
        .id_table       = if_cs_ids,
 };
-
-
-static int __init if_cs_init(void)
-{
-       int ret;
-
-       lbs_deb_enter(LBS_DEB_CS);
-       ret = pcmcia_register_driver(&lbs_driver);
-       lbs_deb_leave(LBS_DEB_CS);
-       return ret;
-}
-
-
-static void __exit if_cs_exit(void)
-{
-       lbs_deb_enter(LBS_DEB_CS);
-       pcmcia_unregister_driver(&lbs_driver);
-       lbs_deb_leave(LBS_DEB_CS);
-}
-
-
-module_init(if_cs_init);
-module_exit(if_cs_exit);
+module_pcmcia_driver(lbs_driver);
index d7dbc00bcfbe81edb63608820ec12f75677a7bd8..d21d95939316ece9557d579226bdc2ef66896b50 100644 (file)
@@ -338,18 +338,4 @@ static struct pcmcia_driver orinoco_driver = {
        .suspend        = orinoco_cs_suspend,
        .resume         = orinoco_cs_resume,
 };
-
-static int __init
-init_orinoco_cs(void)
-{
-       return pcmcia_register_driver(&orinoco_driver);
-}
-
-static void __exit
-exit_orinoco_cs(void)
-{
-       pcmcia_unregister_driver(&orinoco_driver);
-}
-
-module_init(init_orinoco_cs);
-module_exit(exit_orinoco_cs);
+module_pcmcia_driver(orinoco_driver);
index 6e28ee4e9c52a5983b6f9a42a4f9d3c8c7ba2ed9..e2264bc12ebf30cf5119d997c70356dc2af1446c 100644 (file)
@@ -318,18 +318,4 @@ static struct pcmcia_driver orinoco_driver = {
        .resume         = spectrum_cs_resume,
        .id_table       = spectrum_cs_ids,
 };
-
-static int __init
-init_spectrum_cs(void)
-{
-       return pcmcia_register_driver(&orinoco_driver);
-}
-
-static void __exit
-exit_spectrum_cs(void)
-{
-       pcmcia_unregister_driver(&orinoco_driver);
-}
-
-module_init(init_spectrum_cs);
-module_exit(exit_spectrum_cs);
+module_pcmcia_driver(orinoco_driver);
index 730186d0449b281b08242a1116c2f85115248f04..38d2089f338a3277d8ff77126f3dd166524f84b8 100644 (file)
@@ -2013,19 +2013,7 @@ static struct pcmcia_driver wl3501_driver = {
        .suspend        = wl3501_suspend,
        .resume         = wl3501_resume,
 };
-
-static int __init wl3501_init_module(void)
-{
-       return pcmcia_register_driver(&wl3501_driver);
-}
-
-static void __exit wl3501_exit_module(void)
-{
-       pcmcia_unregister_driver(&wl3501_driver);
-}
-
-module_init(wl3501_init_module);
-module_exit(wl3501_exit_module);
+module_pcmcia_driver(wl3501_driver);
 
 MODULE_AUTHOR("Fox Chen <mhchen@golf.ccl.itri.org.tw>, "
              "Arnaldo Carvalho de Melo <acme@conectiva.com.br>,"