Commit fdd3f29e authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

drivers/net: use module_pcmcia_driver() in pcmcia drivers

Use the new module_pcmcia_driver() macro to remove the boilerplate
module init/exit code in the pcmcia drivers.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b85c4a18
...@@ -333,16 +333,4 @@ static struct pcmcia_driver com20020_cs_driver = { ...@@ -333,16 +333,4 @@ static struct pcmcia_driver com20020_cs_driver = {
.suspend = com20020_suspend, .suspend = com20020_suspend,
.resume = com20020_resume, .resume = com20020_resume,
}; };
module_pcmcia_driver(com20020_cs_driver);
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);
...@@ -316,15 +316,4 @@ static struct pcmcia_driver ems_pcmcia_driver = { ...@@ -316,15 +316,4 @@ static struct pcmcia_driver ems_pcmcia_driver = {
.remove = ems_pcmcia_remove, .remove = ems_pcmcia_remove,
.id_table = ems_pcmcia_tbl, .id_table = ems_pcmcia_tbl,
}; };
module_pcmcia_driver(ems_pcmcia_driver);
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);
...@@ -740,15 +740,4 @@ static struct pcmcia_driver pcan_driver = { ...@@ -740,15 +740,4 @@ static struct pcmcia_driver pcan_driver = {
.remove = pcan_remove, .remove = pcan_remove,
.id_table = pcan_table, .id_table = pcan_table,
}; };
module_pcmcia_driver(pcan_driver);
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);
...@@ -1165,16 +1165,4 @@ static struct pcmcia_driver tc574_driver = { ...@@ -1165,16 +1165,4 @@ static struct pcmcia_driver tc574_driver = {
.suspend = tc574_suspend, .suspend = tc574_suspend,
.resume = tc574_resume, .resume = tc574_resume,
}; };
module_pcmcia_driver(tc574_driver);
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);
...@@ -928,16 +928,4 @@ static struct pcmcia_driver tc589_driver = { ...@@ -928,16 +928,4 @@ static struct pcmcia_driver tc589_driver = {
.suspend = tc589_suspend, .suspend = tc589_suspend,
.resume = tc589_resume, .resume = tc589_resume,
}; };
module_pcmcia_driver(tc589_driver);
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);
...@@ -728,19 +728,7 @@ static struct pcmcia_driver axnet_cs_driver = { ...@@ -728,19 +728,7 @@ static struct pcmcia_driver axnet_cs_driver = {
.suspend = axnet_suspend, .suspend = axnet_suspend,
.resume = axnet_resume, .resume = axnet_resume,
}; };
module_pcmcia_driver(axnet_cs_driver);
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);
/*====================================================================*/ /*====================================================================*/
......
...@@ -1694,16 +1694,4 @@ static struct pcmcia_driver pcnet_driver = { ...@@ -1694,16 +1694,4 @@ static struct pcmcia_driver pcnet_driver = {
.suspend = pcnet_suspend, .suspend = pcnet_suspend,
.resume = pcnet_resume, .resume = pcnet_resume,
}; };
module_pcmcia_driver(pcnet_driver);
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);
...@@ -1508,16 +1508,4 @@ static struct pcmcia_driver nmclan_cs_driver = { ...@@ -1508,16 +1508,4 @@ static struct pcmcia_driver nmclan_cs_driver = {
.suspend = nmclan_suspend, .suspend = nmclan_suspend,
.resume = nmclan_resume, .resume = nmclan_resume,
}; };
module_pcmcia_driver(nmclan_cs_driver);
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);
...@@ -705,19 +705,7 @@ static struct pcmcia_driver fmvj18x_cs_driver = { ...@@ -705,19 +705,7 @@ static struct pcmcia_driver fmvj18x_cs_driver = {
.suspend = fmvj18x_suspend, .suspend = fmvj18x_suspend,
.resume = fmvj18x_resume, .resume = fmvj18x_resume,
}; };
module_pcmcia_driver(fmvj18x_cs_driver);
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);
/*====================================================================*/ /*====================================================================*/
......
...@@ -2054,16 +2054,4 @@ static struct pcmcia_driver smc91c92_cs_driver = { ...@@ -2054,16 +2054,4 @@ static struct pcmcia_driver smc91c92_cs_driver = {
.suspend = smc91c92_suspend, .suspend = smc91c92_suspend,
.resume = smc91c92_resume, .resume = smc91c92_resume,
}; };
module_pcmcia_driver(smc91c92_cs_driver);
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);
...@@ -1775,21 +1775,7 @@ static struct pcmcia_driver xirc2ps_cs_driver = { ...@@ -1775,21 +1775,7 @@ static struct pcmcia_driver xirc2ps_cs_driver = {
.suspend = xirc2ps_suspend, .suspend = xirc2ps_suspend,
.resume = xirc2ps_resume, .resume = xirc2ps_resume,
}; };
module_pcmcia_driver(xirc2ps_cs_driver);
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);
#ifndef MODULE #ifndef MODULE
static int __init setup_xirc2ps_cs(char *str) static int __init setup_xirc2ps_cs(char *str)
......
...@@ -180,16 +180,7 @@ static struct pcmcia_driver airo_driver = { ...@@ -180,16 +180,7 @@ static struct pcmcia_driver airo_driver = {
.suspend = airo_suspend, .suspend = airo_suspend,
.resume = airo_resume, .resume = airo_resume,
}; };
module_pcmcia_driver(airo_driver);
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);
}
/* /*
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
...@@ -229,6 +220,3 @@ static void __exit airo_cs_cleanup(void) ...@@ -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 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
module_init(airo_cs_init);
module_exit(airo_cs_cleanup);
...@@ -245,16 +245,7 @@ static struct pcmcia_driver atmel_driver = { ...@@ -245,16 +245,7 @@ static struct pcmcia_driver atmel_driver = {
.suspend = atmel_suspend, .suspend = atmel_suspend,
.resume = atmel_resume, .resume = atmel_resume,
}; };
module_pcmcia_driver(atmel_driver);
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);
}
/* /*
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or
...@@ -294,6 +285,3 @@ static void __exit atmel_cs_cleanup(void) ...@@ -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 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
module_init(atmel_cs_init);
module_exit(atmel_cs_cleanup);
...@@ -130,6 +130,10 @@ static struct pcmcia_driver b43_pcmcia_driver = { ...@@ -130,6 +130,10 @@ static struct pcmcia_driver b43_pcmcia_driver = {
.resume = b43_pcmcia_resume, .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) int b43_pcmcia_init(void)
{ {
return pcmcia_register_driver(&b43_pcmcia_driver); return pcmcia_register_driver(&b43_pcmcia_driver);
......
...@@ -709,17 +709,4 @@ static struct pcmcia_driver hostap_driver = { ...@@ -709,17 +709,4 @@ static struct pcmcia_driver hostap_driver = {
.suspend = hostap_cs_suspend, .suspend = hostap_cs_suspend,
.resume = hostap_cs_resume, .resume = hostap_cs_resume,
}; };
module_pcmcia_driver(hostap_driver);
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);
...@@ -999,7 +999,6 @@ static const struct pcmcia_device_id if_cs_ids[] = { ...@@ -999,7 +999,6 @@ static const struct pcmcia_device_id if_cs_ids[] = {
}; };
MODULE_DEVICE_TABLE(pcmcia, if_cs_ids); MODULE_DEVICE_TABLE(pcmcia, if_cs_ids);
static struct pcmcia_driver lbs_driver = { static struct pcmcia_driver lbs_driver = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.name = DRV_NAME, .name = DRV_NAME,
...@@ -1007,26 +1006,4 @@ static struct pcmcia_driver lbs_driver = { ...@@ -1007,26 +1006,4 @@ static struct pcmcia_driver lbs_driver = {
.remove = if_cs_detach, .remove = if_cs_detach,
.id_table = if_cs_ids, .id_table = if_cs_ids,
}; };
module_pcmcia_driver(lbs_driver);
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);
...@@ -338,18 +338,4 @@ static struct pcmcia_driver orinoco_driver = { ...@@ -338,18 +338,4 @@ static struct pcmcia_driver orinoco_driver = {
.suspend = orinoco_cs_suspend, .suspend = orinoco_cs_suspend,
.resume = orinoco_cs_resume, .resume = orinoco_cs_resume,
}; };
module_pcmcia_driver(orinoco_driver);
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);
...@@ -318,18 +318,4 @@ static struct pcmcia_driver orinoco_driver = { ...@@ -318,18 +318,4 @@ static struct pcmcia_driver orinoco_driver = {
.resume = spectrum_cs_resume, .resume = spectrum_cs_resume,
.id_table = spectrum_cs_ids, .id_table = spectrum_cs_ids,
}; };
module_pcmcia_driver(orinoco_driver);
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);
...@@ -2013,19 +2013,7 @@ static struct pcmcia_driver wl3501_driver = { ...@@ -2013,19 +2013,7 @@ static struct pcmcia_driver wl3501_driver = {
.suspend = wl3501_suspend, .suspend = wl3501_suspend,
.resume = wl3501_resume, .resume = wl3501_resume,
}; };
module_pcmcia_driver(wl3501_driver);
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_AUTHOR("Fox Chen <mhchen@golf.ccl.itri.org.tw>, " MODULE_AUTHOR("Fox Chen <mhchen@golf.ccl.itri.org.tw>, "
"Arnaldo Carvalho de Melo <acme@conectiva.com.br>," "Arnaldo Carvalho de Melo <acme@conectiva.com.br>,"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment