Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185822
b: refs/heads/master
c: d4ae541
h: refs/heads/master
v: v3
  • Loading branch information
Wolfram Sang authored and David S. Miller committed Jan 15, 2010
1 parent 4b5cfea commit 037e667
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3be57b6f35ef96a980ce84e59d6a5a8ca6184ad
refs/heads/master: d4ae5415c6f2dd8f14e027c24f09d708f11a8d60
23 changes: 11 additions & 12 deletions trunk/drivers/ide/ide-cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,19 +121,11 @@ static int ide_probe(struct pcmcia_device *link)
static void ide_detach(struct pcmcia_device *link)
{
ide_info_t *info = link->priv;
ide_hwif_t *hwif = info->host->ports[0];
unsigned long data_addr, ctl_addr;

dev_dbg(&link->dev, "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(ctl_addr, 1);
release_region(data_addr, 8);

kfree(info);
} /* ide_detach */

Expand Down Expand Up @@ -354,12 +346,19 @@ static void ide_release(struct pcmcia_device *link)

dev_dbg(&link->dev, "ide_release(0x%p)\n", link);

if (info->ndev)
/* FIXME: if this fails we need to queue the cleanup somehow
-- need to investigate the required PCMCIA magic */
if (info->ndev) {
ide_hwif_t *hwif = host->ports[0];
unsigned long data_addr, ctl_addr;

data_addr = hwif->io_ports.data_addr;
ctl_addr = hwif->io_ports.ctl_addr;

ide_host_remove(host);
info->ndev = 0;

info->ndev = 0;
release_region(ctl_addr, 1);
release_region(data_addr, 8);
}

pcmcia_disable_device(link);
} /* ide_release */
Expand Down

0 comments on commit 037e667

Please sign in to comment.