diff options
Diffstat (limited to 'drivers/ide/legacy/ide-cs.c')
-rw-r--r-- | drivers/ide/legacy/ide-cs.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c index 855e157b18d3..aa2ea3deac85 100644 --- a/drivers/ide/legacy/ide-cs.c +++ b/drivers/ide/legacy/ide-cs.c | |||
@@ -140,8 +140,8 @@ static void ide_detach(struct pcmcia_device *link) | |||
140 | 140 | ||
141 | ide_release(link); | 141 | ide_release(link); |
142 | 142 | ||
143 | release_region(hwif->io_ports[IDE_CONTROL_OFFSET], 1); | 143 | release_region(hwif->io_ports.ctl_addr, 1); |
144 | release_region(hwif->io_ports[IDE_DATA_OFFSET], 8); | 144 | release_region(hwif->io_ports.data_addr, 8); |
145 | 145 | ||
146 | kfree(info); | 146 | kfree(info); |
147 | } /* ide_detach */ | 147 | } /* ide_detach */ |
@@ -183,11 +183,7 @@ static ide_hwif_t *idecs_register(unsigned long io, unsigned long ctl, | |||
183 | 183 | ||
184 | i = hwif->index; | 184 | i = hwif->index; |
185 | 185 | ||
186 | if (hwif->present) | 186 | ide_init_port_data(hwif, i); |
187 | ide_unregister(i); | ||
188 | else | ||
189 | ide_init_port_data(hwif, i); | ||
190 | |||
191 | ide_init_port_hw(hwif, &hw); | 187 | ide_init_port_hw(hwif, &hw); |
192 | hwif->port_ops = &idecs_port_ops; | 188 | hwif->port_ops = &idecs_port_ops; |
193 | 189 | ||
@@ -390,7 +386,7 @@ void ide_release(struct pcmcia_device *link) | |||
390 | if (info->ndev) { | 386 | if (info->ndev) { |
391 | /* FIXME: if this fails we need to queue the cleanup somehow | 387 | /* FIXME: if this fails we need to queue the cleanup somehow |
392 | -- need to investigate the required PCMCIA magic */ | 388 | -- need to investigate the required PCMCIA magic */ |
393 | ide_unregister(hwif->index); | 389 | ide_unregister(hwif); |
394 | } | 390 | } |
395 | info->ndev = 0; | 391 | info->ndev = 0; |
396 | 392 | ||