Commit eb7040af authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jeff Garzik

[PATCH] wireless pcmcia updates

the same patch stil applies..
parent 6122979e
...@@ -1743,30 +1743,27 @@ static int netwave_close(struct net_device *dev) { ...@@ -1743,30 +1743,27 @@ static int netwave_close(struct net_device *dev) {
return 0; return 0;
} }
static int __init init_netwave_cs(void) { static struct pcmcia_driver netwave_driver = {
servinfo_t serv; .owner = THIS_MODULE,
.drv = {
DEBUG(0, "%s\n", version); .name = "netwave_cs",
},
CardServices(GetCardServicesInfo, &serv); .attach = netwave_attach,
if (serv.Revision != CS_RELEASE_CODE) { .detach = netwave_detach,
printk("netwave_cs: Card Services release does not match!\n"); };
return -1;
}
register_pccard_driver(&dev_info, &netwave_attach, &netwave_detach);
return 0; static int __init init_netwave_cs(void)
{
return pcmcia_register_driver(&netwave_driver);
} }
static void __exit exit_netwave_cs(void) { static void __exit exit_netwave_cs(void)
DEBUG(1, "netwave_cs: unloading\n"); {
pcmcia_unregister_driver(&netwave_driver);
unregister_pccard_driver(&dev_info);
/* Do some cleanup of the device list */ /* Do some cleanup of the device list */
netwave_flush_stale_links(); netwave_flush_stale_links();
if(dev_list != NULL) /* Critical situation */ if (dev_list != NULL) /* Critical situation */
printk("netwave_cs: devices remaining when removing module\n"); printk("netwave_cs: devices remaining when removing module\n");
} }
......
...@@ -687,29 +687,27 @@ orinoco_cs_event(event_t event, int priority, ...@@ -687,29 +687,27 @@ orinoco_cs_event(event_t event, int priority,
* become const */ * become const */
static char version[] __initdata = "orinoco_cs.c 0.13a (David Gibson <hermes@gibson.dropbear.id.au> and others)"; static char version[] __initdata = "orinoco_cs.c 0.13a (David Gibson <hermes@gibson.dropbear.id.au> and others)";
static struct pcmcia_driver orinoco_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "orinoco_cs",
},
.attach = orinoco_cs_attach,
.detach = orinoco_cs_detach,
};
static int __init static int __init
init_orinoco_cs(void) init_orinoco_cs(void)
{ {
servinfo_t serv;
printk(KERN_DEBUG "%s\n", version); printk(KERN_DEBUG "%s\n", version);
CardServices(GetCardServicesInfo, &serv); return pcmcia_register_driver(&orinoco_driver);
if (serv.Revision != CS_RELEASE_CODE) {
printk(KERN_NOTICE "orinoco_cs: Card Services release "
"does not match!\n");
return -1;
}
register_pccard_driver(&dev_info, &orinoco_cs_attach, &orinoco_cs_detach);
return 0;
} }
static void __exit static void __exit
exit_orinoco_cs(void) exit_orinoco_cs(void)
{ {
unregister_pccard_driver(&dev_info); pcmcia_unregister_driver(&orinoco_driver);
if (dev_list) if (dev_list)
DEBUG(0, "orinoco_cs: Removing leftover devices.\n"); DEBUG(0, "orinoco_cs: Removing leftover devices.\n");
......
...@@ -5026,77 +5026,28 @@ wavelan_event(event_t event, /* The event received */ ...@@ -5026,77 +5026,28 @@ wavelan_event(event_t event, /* The event received */
return 0; return 0;
} }
/****************************** MODULE ******************************/ static struct pcmcia_driver wavelan_driver = {
/* .owner = THIS_MODULE,
* Module entry points : insertion & removal .drv = {
*/ .name = "wavelan_cs",
},
.attach = wavelan_attach,
.detach = wavelan_detach,
};
/*------------------------------------------------------------------*/
/*
* Module insertion : initialisation of the module.
* Register the card with cardmgr...
*/
static int __init static int __init
init_wavelan_cs(void) init_wavelan_cs(void)
{ {
servinfo_t serv; return pcmcia_register_driver(&wavelan_driver);
#ifdef DEBUG_MODULE_TRACE
printk(KERN_DEBUG "-> init_wavelan_cs()\n");
#ifdef DEBUG_VERSION_SHOW
printk(KERN_DEBUG "%s", version);
#endif
#endif
CardServices(GetCardServicesInfo, &serv);
if(serv.Revision != CS_RELEASE_CODE)
{
#ifdef DEBUG_CONFIG_ERRORS
printk(KERN_WARNING "init_wavelan_cs: Card Services release does not match!\n");
#endif
return -1;
}
register_pccard_driver(&dev_info, &wavelan_attach, &wavelan_detach);
#ifdef DEBUG_MODULE_TRACE
printk(KERN_DEBUG "<- init_wavelan_cs()\n");
#endif
return 0;
} }
/*------------------------------------------------------------------*/
/*
* Module removal
*/
static void __exit static void __exit
exit_wavelan_cs(void) exit_wavelan_cs(void)
{ {
#ifdef DEBUG_MODULE_TRACE
printk(KERN_DEBUG "-> cleanup_module()\n");
#endif
#ifdef DEBUG_BASIC_SHOW
printk(KERN_NOTICE "wavelan_cs: unloading\n");
#endif
/* Do some cleanup of the device list */ /* Do some cleanup of the device list */
wv_flush_stale_links(); wv_flush_stale_links();
/* If there remain some devices... */ pcmcia_unregister_driver(&wavelan_driver);
#ifdef DEBUG_CONFIG_ERRORS
if(dev_list != NULL)
{
/* Honestly, if this happen we are in a deep s**t */
printk(KERN_INFO "wavelan_cs: devices remaining when removing module\n");
printk(KERN_INFO "Please flush your disks and reboot NOW !\n");
}
#endif
unregister_pccard_driver(&dev_info);
#ifdef DEBUG_MODULE_TRACE
printk(KERN_DEBUG "<- cleanup_module()\n");
#endif
} }
module_init(init_wavelan_cs); module_init(init_wavelan_cs);
......
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