diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-15 03:32:39 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:15:50 -0500 |
commit | 5f2a71fcb7995633b335a1e380ac63a968e61320 (patch) | |
tree | d47f4227d314fc9f298b75c217fa78440004e6e7 /drivers/net/wireless/wavelan_cs.c | |
parent | 1de9cedfbdff1d8adb662cd3afc5bda66e393351 (diff) |
[PATCH] pcmcia: add pcmcia_disable_device
pcmcia_disable_device(struct pcmcia_device *p_dev) performs the necessary
cleanups upon device or driver removal: it calls the appropriate
pcmcia_release_* functions, and can replace (most) of the current drivers'
_release() functions.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/wavelan_cs.c')
-rw-r--r-- | drivers/net/wireless/wavelan_cs.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index 98122f3a4bc2..696aeb9d8f52 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c | |||
@@ -4098,24 +4098,18 @@ wv_pcmcia_config(dev_link_t * link) | |||
4098 | static void | 4098 | static void |
4099 | wv_pcmcia_release(dev_link_t *link) | 4099 | wv_pcmcia_release(dev_link_t *link) |
4100 | { | 4100 | { |
4101 | struct net_device * dev = (struct net_device *) link->priv; | 4101 | struct net_device * dev = (struct net_device *) link->priv; |
4102 | net_local * lp = netdev_priv(dev); | 4102 | net_local * lp = netdev_priv(dev); |
4103 | 4103 | ||
4104 | #ifdef DEBUG_CONFIG_TRACE | 4104 | #ifdef DEBUG_CONFIG_TRACE |
4105 | printk(KERN_DEBUG "%s: -> wv_pcmcia_release(0x%p)\n", dev->name, link); | 4105 | printk(KERN_DEBUG "%s: -> wv_pcmcia_release(0x%p)\n", dev->name, link); |
4106 | #endif | 4106 | #endif |
4107 | 4107 | ||
4108 | /* Don't bother checking to see if these succeed or not */ | 4108 | iounmap(lp->mem); |
4109 | iounmap(lp->mem); | 4109 | pcmcia_disable_device(link->handle); |
4110 | pcmcia_release_window(link->win); | ||
4111 | pcmcia_release_configuration(link->handle); | ||
4112 | pcmcia_release_io(link->handle, &link->io); | ||
4113 | pcmcia_release_irq(link->handle, &link->irq); | ||
4114 | |||
4115 | link->state &= ~DEV_CONFIG; | ||
4116 | 4110 | ||
4117 | #ifdef DEBUG_CONFIG_TRACE | 4111 | #ifdef DEBUG_CONFIG_TRACE |
4118 | printk(KERN_DEBUG "%s: <- wv_pcmcia_release()\n", dev->name); | 4112 | printk(KERN_DEBUG "%s: <- wv_pcmcia_release()\n", dev->name); |
4119 | #endif | 4113 | #endif |
4120 | } | 4114 | } |
4121 | 4115 | ||