aboutsummaryrefslogtreecommitdiff
path: root/drivers/ide/legacy/ide-cs.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2005-11-09 22:47:18 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2005-11-09 22:47:18 +0100
commit4349d5cdf28d46c22d467079e80ee9695dcec0ad (patch)
treef16b8cb1689a82ebb48d95f9be2f66b56fb62189 /drivers/ide/legacy/ide-cs.c
parenta5ee3634630c218e86afc5bae2acb55b9e47625d (diff)
[PATCH] ide: incorrect device link for ide-cs
Devices driven by ide-cs will appear under /sys/devices instead of the appropriate PCMCIA device. To fix this I had to extend the hw_regs_t structure with a 'struct device' field, which allows us to set the parent link for the appropriate hwif. Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Jens Axboe <axboe@suse.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/legacy/ide-cs.c')
-rw-r--r--drivers/ide/legacy/ide-cs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/ide/legacy/ide-cs.c b/drivers/ide/legacy/ide-cs.c
index 1dafffa7e51..ef79805218e 100644
--- a/drivers/ide/legacy/ide-cs.c
+++ b/drivers/ide/legacy/ide-cs.c
@@ -182,13 +182,14 @@ static void ide_detach(dev_link_t *link)
} /* ide_detach */
-static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq)
+static int idecs_register(unsigned long io, unsigned long ctl, unsigned long irq, struct pcmcia_device *handle)
{
hw_regs_t hw;
memset(&hw, 0, sizeof(hw));
ide_init_hwif_ports(&hw, io, ctl, NULL);
hw.irq = irq;
hw.chipset = ide_pci;
+ hw.dev = &handle->dev;
return ide_register_hw_with_fixup(&hw, NULL, ide_undecoded_slave);
}
@@ -327,12 +328,12 @@ static void ide_config(dev_link_t *link)
/* retry registration in case device is still spinning up */
for (hd = -1, i = 0; i < 10; i++) {
- hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ);
+ hd = idecs_register(io_base, ctl_base, link->irq.AssignedIRQ, handle);
if (hd >= 0) break;
if (link->io.NumPorts1 == 0x20) {
outb(0x02, ctl_base + 0x10);
hd = idecs_register(io_base + 0x10, ctl_base + 0x10,
- link->irq.AssignedIRQ);
+ link->irq.AssignedIRQ, handle);
if (hd >= 0) {
io_base += 0x10;
ctl_base += 0x10;