diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-15 09:32:39 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 17:15:50 +0200 |
commit | 5f2a71fcb7995633b335a1e380ac63a968e61320 (patch) | |
tree | d47f4227d314fc9f298b75c217fa78440004e6e7 /drivers/char/pcmcia | |
parent | 1de9cedfbdff1d8adb662cd3afc5bda66e393351 (diff) | |
download | blackbird-op-linux-5f2a71fcb7995633b335a1e380ac63a968e61320.tar.gz blackbird-op-linux-5f2a71fcb7995633b335a1e380ac63a968e61320.zip |
[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/char/pcmcia')
-rw-r--r-- | drivers/char/pcmcia/cm4000_cs.c | 3 | ||||
-rw-r--r-- | drivers/char/pcmcia/cm4040_cs.c | 3 | ||||
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 10 |
3 files changed, 3 insertions, 13 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index 5fdf18515433..3ddd3da9e720 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -1899,8 +1899,7 @@ static int cm4000_resume(struct pcmcia_device *p_dev) static void cm4000_release(dev_link_t *link) { cmm_cm4000_release(link->priv); /* delay release until device closed */ - pcmcia_release_configuration(link->handle); - pcmcia_release_io(link->handle, &link->io); + pcmcia_disable_device(link->handle); } static int cm4000_attach(struct pcmcia_device *p_dev) diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index 466e33bab029..1c355bd2be88 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c @@ -654,8 +654,7 @@ static int reader_resume(struct pcmcia_device *p_dev) static void reader_release(dev_link_t *link) { cm4040_reader_release(link->priv); - pcmcia_release_configuration(link->handle); - pcmcia_release_io(link->handle, &link->io); + pcmcia_disable_device(link->handle); } static int reader_attach(struct pcmcia_device *p_dev) diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index e6b714b6390d..371d10b78004 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -710,15 +710,7 @@ static void mgslpc_release(u_long arg) if (debug_level >= DEBUG_LEVEL_INFO) printk("mgslpc_release(0x%p)\n", link); - /* Unlink the device chain */ - link->dev = NULL; - link->state &= ~DEV_CONFIG; - - pcmcia_release_configuration(link->handle); - if (link->io.NumPorts1) - pcmcia_release_io(link->handle, &link->io); - if (link->irq.AssignedIRQ) - pcmcia_release_irq(link->handle, &link->irq); + pcmcia_disable_device(link->handle); } static void mgslpc_detach(struct pcmcia_device *p_dev) |