diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-06-10 20:56:37 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-06-10 20:56:37 +0200 |
commit | 8a7dbb9761d59996e4a037c969eabd8e93f3be1c (patch) | |
tree | cd7a737967b35896faf0f65a53e5214c43cf4eb8 /drivers/ide/pci | |
parent | d427e836d1d9b58e8f1e648c09b5fbe36e01013b (diff) | |
download | blackbird-op-linux-8a7dbb9761d59996e4a037c969eabd8e93f3be1c.tar.gz blackbird-op-linux-8a7dbb9761d59996e4a037c969eabd8e93f3be1c.zip |
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/pci')
-rw-r--r-- | drivers/ide/pci/delkin_cb.c | 3 |
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) 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; |