aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/xirc2ps_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-01-15 03:32:39 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:15:50 -0500
commit5f2a71fcb7995633b335a1e380ac63a968e61320 (patch)
treed47f4227d314fc9f298b75c217fa78440004e6e7 /drivers/net/pcmcia/xirc2ps_cs.c
parent1de9cedfbdff1d8adb662cd3afc5bda66e393351 (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/pcmcia/xirc2ps_cs.c')
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index eed496803fe4..2b57a87371f3 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -1090,21 +1090,15 @@ xirc2ps_config(dev_link_t * link)
1090static void 1090static void
1091xirc2ps_release(dev_link_t *link) 1091xirc2ps_release(dev_link_t *link)
1092{ 1092{
1093 DEBUG(0, "release(0x%p)\n", link);
1093 1094
1094 DEBUG(0, "release(0x%p)\n", link); 1095 if (link->win) {
1095 1096 struct net_device *dev = link->priv;
1096 if (link->win) { 1097 local_info_t *local = netdev_priv(dev);
1097 struct net_device *dev = link->priv; 1098 if (local->dingo)
1098 local_info_t *local = netdev_priv(dev); 1099 iounmap(local->dingo_ccr - 0x0800);
1099 if (local->dingo) 1100 }
1100 iounmap(local->dingo_ccr - 0x0800); 1101 pcmcia_disable_device(link->handle);
1101 pcmcia_release_window(link->win);
1102 }
1103 pcmcia_release_configuration(link->handle);
1104 pcmcia_release_io(link->handle, &link->io);
1105 pcmcia_release_irq(link->handle, &link->irq);
1106 link->state &= ~DEV_CONFIG;
1107
1108} /* xirc2ps_release */ 1102} /* xirc2ps_release */
1109 1103
1110/*====================================================================*/ 1104/*====================================================================*/