aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-06-15 15:00:23 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-06-15 15:00:23 -0400
commitfbc69fd9b76158daaa83e5372e44fdd81df20f92 (patch)
tree43c516664f3b980c6d1919136cc7a51cffd018ea
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>
-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 d08107db54d4..f633b6b3c7f3 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)
135{ 135{
136 ide_info_t *info = link->priv; 136 ide_info_t *info = link->priv;
137 ide_hwif_t *hwif = info->hwif; 137 ide_hwif_t *hwif = info->hwif;
138 unsigned long data_addr, ctl_addr;
138 139
139 DEBUG(0, "ide_detach(0x%p)\n", link); 140 DEBUG(0, "ide_detach(0x%p)\n", link);
140 141
142 data_addr = hwif->io_ports.data_addr;
143 ctl_addr = hwif->io_ports.ctl_addr;
144
141 ide_release(link); 145 ide_release(link);
142 146
143 release_region(hwif->io_ports.ctl_addr, 1); 147 release_region(ctl_addr, 1);
144 release_region(hwif->io_ports.data_addr, 8); 148 release_region(data_addr, 8);
145 149
146 kfree(info); 150 kfree(info);
147} /* ide_detach */ 151} /* ide_detach */