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/scsi/pcmcia/nsp_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/scsi/pcmcia/nsp_cs.c')
-rw-r--r-- | drivers/scsi/pcmcia/nsp_cs.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c index 9e3ab3fd5355..dd383c538d98 100644 --- a/drivers/scsi/pcmcia/nsp_cs.c +++ b/drivers/scsi/pcmcia/nsp_cs.c | |||
@@ -1974,16 +1974,9 @@ static void nsp_cs_release(dev_link_t *link) | |||
1974 | if (data != NULL) { | 1974 | if (data != NULL) { |
1975 | iounmap((void *)(data->MmioAddress)); | 1975 | iounmap((void *)(data->MmioAddress)); |
1976 | } | 1976 | } |
1977 | pcmcia_release_window(link->win); | ||
1978 | } | 1977 | } |
1979 | pcmcia_release_configuration(link->handle); | 1978 | pcmcia_disable_device(link->handle); |
1980 | if (link->io.NumPorts1) { | 1979 | |
1981 | pcmcia_release_io(link->handle, &link->io); | ||
1982 | } | ||
1983 | if (link->irq.AssignedIRQ) { | ||
1984 | pcmcia_release_irq(link->handle, &link->irq); | ||
1985 | } | ||
1986 | link->state &= ~DEV_CONFIG; | ||
1987 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,2)) | 1980 | #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,2)) |
1988 | if (info->host != NULL) { | 1981 | if (info->host != NULL) { |
1989 | scsi_host_put(info->host); | 1982 | scsi_host_put(info->host); |