aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide/legacy
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-06-15 21:00:23 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-06-15 21:00:23 +0200
commitfbc69fd9b76158daaa83e5372e44fdd81df20f92 (patch)
tree43c516664f3b980c6d1919136cc7a51cffd018ea /drivers/ide/legacy
parent792a1a98560a2a1619491eed8b18fccb09b312a7 (diff)
ide-cs: fix releasing I/O resources
hwif content is already freed after ide_release() call so cache hwif->io_ports.{data,ctl}_addr in local variables in ide_detach(). This fixes post-2.6.25 regression. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/legacy')
-rw-r--r--drivers/ide/legacy/ide-cs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index d08107db54d..f633b6b3c7f 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -135,13 +135,17 @@ static void ide_detach(struct pcmcia_device *link)
{
ide_info_t *info = link->priv;
ide_hwif_t *hwif = info->hwif;
+ unsigned long data_addr, ctl_addr;
DEBUG(0, "ide_detach(0x%p)\n", link);
+ data_addr = hwif->io_ports.data_addr;
+ ctl_addr = hwif->io_ports.ctl_addr;
+
ide_release(link);
- release_region(hwif->io_ports.ctl_addr, 1);
- release_region(hwif->io_ports.data_addr, 8);
+ release_region(ctl_addr, 1);
+ release_region(data_addr, 8);
kfree(info);
} /* ide_detach */