Skip to content

Commit

Permalink
delkin_cb: set proper hwif->gendev.parent value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jun 10, 2008
1 parent d427e83 commit 8a7dbb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/ide/pci/delkin_cb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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;
Expand Down

0 comments on commit 8a7dbb9

Please sign in to comment.