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,31 +1743,28 @@ static int netwave_close(struct net_device *dev) {
return 0;
}
static int __init init_netwave_cs(void) {
servinfo_t serv;
DEBUG(0, "%s\n", version);
static struct pcmcia_driver netwave_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "netwave_cs",
},
.attach = netwave_attach,
.detach = netwave_detach,
};
CardServices(GetCardServicesInfo, &serv);
if (serv.Revision != CS_RELEASE_CODE) {
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) {
DEBUG(1, "netwave_cs: unloading\n");
unregister_pccard_driver(&dev_info);
static void __exit exit_netwave_cs(void)
{
pcmcia_unregister_driver(&netwave_driver);
/* Do some cleanup of the device list */
netwave_flush_stale_links();
if(dev_list != NULL) /* Critical situation */
printk("netwave_cs: devices remaining when removing module\n");
/* Do some cleanup of the device list */
netwave_flush_stale_links();
if (dev_list != NULL) /* Critical situation */
printk("netwave_cs: devices remaining when removing module\n");
}
module_init(init_netwave_cs);
......
......@@ -687,29 +687,27 @@ orinoco_cs_event(event_t event, int priority,
* become const */
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
init_orinoco_cs(void)
{
servinfo_t serv;
printk(KERN_DEBUG "%s\n", version);
CardServices(GetCardServicesInfo, &serv);
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;
return pcmcia_register_driver(&orinoco_driver);
}
static void __exit
exit_orinoco_cs(void)
{
unregister_pccard_driver(&dev_info);
pcmcia_unregister_driver(&orinoco_driver);
if (dev_list)
DEBUG(0, "orinoco_cs: Removing leftover devices.\n");
......
......@@ -5026,77 +5026,28 @@ wavelan_event(event_t event, /* The event received */
return 0;
}
/****************************** MODULE ******************************/
/*
* Module entry points : insertion & removal
*/
static struct pcmcia_driver wavelan_driver = {
.owner = THIS_MODULE,
.drv = {
.name = "wavelan_cs",
},
.attach = wavelan_attach,
.detach = wavelan_detach,
};
/*------------------------------------------------------------------*/
/*
* Module insertion : initialisation of the module.
* Register the card with cardmgr...
*/
static int __init
init_wavelan_cs(void)
{
servinfo_t serv;
#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;
return pcmcia_register_driver(&wavelan_driver);
}
/*------------------------------------------------------------------*/
/*
* Module removal
*/
static void __exit
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 */
wv_flush_stale_links();
/* Do some cleanup of the device list */
wv_flush_stale_links();
/* If there remain some devices... */
#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
pcmcia_unregister_driver(&wavelan_driver);
}
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