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/pcmcia/smc91c92_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/pcmcia/smc91c92_cs.c')
-rw-r--r-- | drivers/net/pcmcia/smc91c92_cs.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c index 8839c4faafd6..56700b154d44 100644 --- a/drivers/net/pcmcia/smc91c92_cs.c +++ b/drivers/net/pcmcia/smc91c92_cs.c | |||
@@ -1181,20 +1181,13 @@ config_failed: /* CS_EXIT_TEST() calls jump to here... */ | |||
1181 | 1181 | ||
1182 | static void smc91c92_release(dev_link_t *link) | 1182 | static void smc91c92_release(dev_link_t *link) |
1183 | { | 1183 | { |
1184 | 1184 | DEBUG(0, "smc91c92_release(0x%p)\n", link); | |
1185 | DEBUG(0, "smc91c92_release(0x%p)\n", link); | 1185 | if (link->win) { |
1186 | 1186 | struct net_device *dev = link->priv; | |
1187 | pcmcia_release_configuration(link->handle); | 1187 | struct smc_private *smc = netdev_priv(dev); |
1188 | pcmcia_release_io(link->handle, &link->io); | 1188 | iounmap(smc->base); |
1189 | pcmcia_release_irq(link->handle, &link->irq); | 1189 | } |
1190 | if (link->win) { | 1190 | pcmcia_disable_device(link->handle); |
1191 | struct net_device *dev = link->priv; | ||
1192 | struct smc_private *smc = netdev_priv(dev); | ||
1193 | iounmap(smc->base); | ||
1194 | pcmcia_release_window(link->win); | ||
1195 | } | ||
1196 | |||
1197 | link->state &= ~DEV_CONFIG; | ||
1198 | } | 1191 | } |
1199 | 1192 | ||
1200 | /*====================================================================== | 1193 | /*====================================================================== |