]> err.no Git - linux-2.6/commitdiff
delkin_cb: set proper hwif->gendev.parent value
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 10 Jun 2008 18:56:37 +0000 (20:56 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tue, 10 Jun 2008 18:56:37 +0000 (20:56 +0200)
hwif->dev was set too late (after ide_device_add() call)
so hwif->gendev.parent was not initialized properly.

Fix it by setting hw.dev and letting ide_init_port_hw()
do the rest.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/pci/delkin_cb.c

index b9e457996d0e2f36034f209772f0c58afa8f9a89..5cf59333ef33029c7bda1318abb5731a27750173 100644 (file)
@@ -79,6 +79,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
        memset(&hw, 0, sizeof(hw));
        ide_std_init_ports(&hw, base + 0x10, base + 0x1e);
        hw.irq = dev->irq;
+       hw.dev = &dev->dev;
        hw.chipset = ide_pci;           /* this enables IRQ sharing */
 
        hwif = ide_find_port();
@@ -99,7 +100,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
                goto out_disable;
 
        pci_set_drvdata(dev, hwif);
-       hwif->dev = &dev->dev;
+
        drive = &hwif->drives[0];
        if (drive->present) {
                drive->io_32bit = 1;