Commit a2d1d6ad authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Anton Blanchard

[netdrvr pcmcia] switch drivers to using pcmcia_register_driver

Affected drivers: 3c574_cs, 3c589_cs, axnet_cs, com20020_cs,
fmvj18x_cs, ibmtr_cs, nmclan_cs, smc91c92_cs, xir2ps_cs
parent b4cd547b
......@@ -1336,37 +1336,26 @@ static int el3_close(struct net_device *dev)
return 0;
}
static int __init init_3c574_cs(void)
static struct pcmcia_driver tc574_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "3c574_cs",
},
.attach = tc574_attach,
.detach = tc574_detach,
};
static int __init init_tc574(void)
{
servinfo_t serv;
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "3c574_cs: Card Services release "
"does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &tc574_attach, &tc574_detach);
return 0;
return pcmcia_register_driver(&tc574_driver);
}
static void __exit exit_3c574_cs(void)
static void __exit exit_tc574(void)
{
DEBUG(0, "3c574_cs: unloading\n");
unregister_pccard_driver(&dev_info);
pcmcia_unregister_driver(&tc574_driver);
while (dev_list != NULL)
tc574_detach(dev_list);
}
module_init(init_3c574_cs);
module_exit(exit_3c574_cs);
/*
* Local variables:
* compile-command: "make 3c574_cs.o"
* c-indent-level: 4
* c-basic-offset: 4
* tab-width: 4
* End:
*/
module_init(init_tc574);
module_exit(exit_tc574);
......@@ -1151,28 +1151,26 @@ static int el3_close(struct net_device *dev)
return 0;
}
/*====================================================================*/
static struct pcmcia_driver tc589_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "3c589_cs",
},
.attach = tc589_attach,
.detach = tc589_detach,
};
static int __init init_3c589_cs(void)
static int __init init_tc589(void)
{
servinfo_t serv;
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_ERR "3c589_cs: Card Services release does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &tc589_attach, &tc589_detach);
return 0;
return pcmcia_register_driver(&tc589_driver);
}
static void __exit exit_3c589_cs(void)
static void __exit exit_tc589(void)
{
DEBUG(0, "3c589_cs: unloading\n");
unregister_pccard_driver(&dev_info);
pcmcia_unregister_driver(&tc589_driver);
while (dev_list != NULL)
tc589_detach(dev_list);
}
module_init(init_3c589_cs);
module_exit(exit_3c589_cs);
module_init(init_tc589);
module_exit(exit_tc589);
......@@ -930,26 +930,23 @@ static void block_output(struct net_device *dev, int count,
outsw(nic_base + AXNET_DATAPORT, buf, count>>1);
}
/*====================================================================*/
static struct pcmcia_driver axnet_cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "axnet_cs",
},
.attach = axnet_attach,
.detach = axnet_detach,
};
static int __init init_axnet_cs(void)
{
servinfo_t serv;
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "axnet_cs: Card Services release "
"does not match!\n");
return -EINVAL;
}
register_pccard_driver(&dev_info, &axnet_attach, &axnet_detach);
return 0;
return pcmcia_register_driver(&axnet_cs_driver);
}
static void __exit exit_axnet_cs(void)
{
DEBUG(0, "axnet_cs: unloading\n");
unregister_pccard_driver(&dev_info);
pcmcia_unregister_driver(&axnet_cs_driver);
while (dev_list != NULL)
axnet_detach(dev_list);
}
......
......@@ -567,27 +567,24 @@ static int com20020_event(event_t event, int priority,
} /* com20020_event */
/*====================================================================*/
static struct pcmcia_driver com20020_cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "com20020_cs",
},
.attach = com20020_attach,
.detach = com20020_detach,
};
static int __init init_com20020_cs(void)
{
servinfo_t serv;
DEBUG(0, "%s\n", VERSION);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "com20020_cs: Card Services release "
"does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &com20020_attach, &com20020_detach);
return 0;
return pcmcia_register_driver(&com20020_cs_driver);
}
static void __exit exit_com20020_cs(void)
{
DEBUG(0, "com20020_cs: unloading\n");
unregister_pccard_driver(&dev_info);
pcmcia_unregister_driver(&com20020_cs_driver);
while (dev_list != NULL)
com20020_detach(dev_list);
}
......
......@@ -829,26 +829,23 @@ static int fmvj18x_event(event_t event, int priority,
return 0;
} /* fmvj18x_event */
/*====================================================================*/
static struct pcmcia_driver fmvj18x_cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "fmvj18x_cs",
},
.attach = fmvj18x_attach,
.detach = fmvj18x_detach,
};
static int __init init_fmvj18x_cs(void)
{
servinfo_t serv;
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "fmvj18x: Card Services release "
"does not match!\n");
return -EINVAL;
}
register_pccard_driver(&dev_info, &fmvj18x_attach, &fmvj18x_detach);
return 0;
return pcmcia_register_driver(&fmvj18x_cs_driver);
}
static void __exit exit_fmvj18x_cs(void)
{
DEBUG(0, "fmvj18x_cs: unloading\n");
unregister_pccard_driver(&dev_info);
pcmcia_unregister_driver(&fmvj18x_cs_driver);
while (dev_list != NULL)
fmvj18x_detach(dev_list);
}
......
......@@ -585,26 +585,23 @@ static void ibmtr_hw_setup(struct net_device *dev, u_int mmiobase)
return;
}
/*====================================================================*/
static struct pcmcia_driver ibmtr_cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "ibmtr_cs",
},
.attach = ibmtr_attach,
.detach = ibmtr_detach,
};
static int __init init_ibmtr_cs(void)
{
servinfo_t serv;
DEBUG(0, "%s", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "ibmtr_cs: Card Services release "
"does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &ibmtr_attach, &ibmtr_detach);
return 0;
return pcmcia_register_driver(&ibmtr_cs_driver);
}
static void __exit exit_ibmtr_cs(void)
{
DEBUG(0, "ibmtr_cs: unloading\n");
unregister_pccard_driver(&dev_info);
pcmcia_unregister_driver(&ibmtr_cs_driver);
while (dev_list != NULL)
ibmtr_detach(dev_list);
}
......
......@@ -1741,31 +1741,23 @@ static void set_multicast_list(struct net_device *dev)
} /* set_multicast_list */
/* ----------------------------------------------------------------------------
init_nmclan_cs
---------------------------------------------------------------------------- */
static struct pcmcia_driver nmclan_cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "nmclan_cs",
},
.attach = nmclan_attach,
.detach = nmclan_detach,
};
static int __init init_nmclan_cs(void)
{
servinfo_t serv;
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "nmclan_cs: Card Services release does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &nmclan_attach, &nmclan_detach);
return 0;
return pcmcia_register_driver(&nmclan_cs_driver);
}
/* ----------------------------------------------------------------------------
exit_nmclan_cs
---------------------------------------------------------------------------- */
static void __exit exit_nmclan_cs(void)
{
DEBUG(0, "nmclan_cs: unloading\n");
unregister_pccard_driver(&dev_info);
pcmcia_unregister_driver(&nmclan_cs_driver);
while (dev_list != NULL)
nmclan_detach(dev_list);
}
......
......@@ -2265,27 +2265,23 @@ static int smc_ioctl (struct net_device *dev, struct ifreq *rq, int cmd)
return rc;
}
/*====================================================================*/
static struct pcmcia_driver smc91c92_cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "smc91c92_cs",
},
.attach = smc91c92_attach,
.detach = smc91c92_detach,
};
static int __init init_smc91c92_cs(void)
{
servinfo_t serv;
DEBUG(0, "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_ERR
"smc91c92_cs: Card Services release does not match!\n");
return -EINVAL;
}
register_pccard_driver(&dev_info, &smc91c92_attach, &smc91c92_detach);
return 0;
return pcmcia_register_driver(&smc91c92_cs_driver);
}
static void __exit exit_smc91c92_cs(void)
{
DEBUG(0, "smc91c92_cs: unloading\n");
unregister_pccard_driver(&dev_info);
pcmcia_unregister_driver(&smc91c92_cs_driver);
while (dev_list != NULL)
smc91c92_detach(dev_list);
}
......
......@@ -2069,29 +2069,26 @@ do_stop(struct net_device *dev)
return 0;
}
static struct pcmcia_driver xirc2ps_cs_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "xirc2ps_cs",
},
.attach = xirc2ps_attach,
.detach = xirc2ps_detach,
};
static int __init
init_xirc2ps_cs(void)
{
servinfo_t serv;
printk(KERN_INFO "%s\n", version);
if (lockup_hack)
printk(KINF_XIRC "lockup hack is enabled\n");
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KNOT_XIRC "Card Services release does not match!\n");
return -1;
}
DEBUG(0, "pc_debug=%d\n", pc_debug);
register_pccard_driver(&dev_info, &xirc2ps_attach, &xirc2ps_detach);
return 0;
return pcmcia_register_driver(&xirc2ps_cs_driver);
}
static void __exit
exit_xirc2ps_cs(void)
{
DEBUG(0, "unloading\n");
unregister_pccard_driver(&dev_info);
pcmcia_unregister_driver(&xirc2ps_cs_driver);
while (dev_list) {
if (dev_list->state & DEV_CONFIG)
xirc2ps_release((u_long)dev_list);
......
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