aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-06-10 14:56:37 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-06-10 14:56:37 -0400
commit8a7dbb9761d59996e4a037c969eabd8e93f3be1c (patch)
treecd7a737967b35896faf0f65a53e5214c43cf4eb8 /drivers/ide
parentd427e836d1d9b58e8f1e648c09b5fbe36e01013b (diff)
delkin_cb: set proper hwif->gendev.parent value
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>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/pci/delkin_cb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ide/pci/delkin_cb.c b/drivers/ide/pci/delkin_cb.c
index b9e457996d0e..5cf59333ef33 100644
--- a/drivers/ide/pci/delkin_cb.c
+++ b/drivers/ide/pci/delkin_cb.c
@@ -79,6 +79,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
79 memset(&hw, 0, sizeof(hw)); 79 memset(&hw, 0, sizeof(hw));
80 ide_std_init_ports(&hw, base + 0x10, base + 0x1e); 80 ide_std_init_ports(&hw, base + 0x10, base + 0x1e);
81 hw.irq = dev->irq; 81 hw.irq = dev->irq;
82 hw.dev = &dev->dev;
82 hw.chipset = ide_pci; /* this enables IRQ sharing */ 83 hw.chipset = ide_pci; /* this enables IRQ sharing */
83 84
84 hwif = ide_find_port(); 85 hwif = ide_find_port();
@@ -99,7 +100,7 @@ delkin_cb_probe (struct pci_dev *dev, const struct pci_device_id *id)
99 goto out_disable; 100 goto out_disable;
100 101
101 pci_set_drvdata(dev, hwif); 102 pci_set_drvdata(dev, hwif);
102 hwif->dev = &dev->dev; 103
103 drive = &hwif->drives[0]; 104 drive = &hwif->drives[0];
104 if (drive->present) { 105 if (drive->present) {
105 drive->io_32bit = 1; 106 drive->io_32bit = 1;