[PATCH 3/9] delkin_cb: set proper hwif->gendev.parent value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx>
---
 drivers/ide/pci/delkin_cb.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/drivers/ide/pci/delkin_cb.c
===================================================================
--- 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, co
 	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();
@@ -98,7 +99,7 @@ delkin_cb_probe (struct pci_dev *dev, co
 		goto out_disable;
 
 	pci_set_drvdata(dev, hwif);
-	hwif->dev = &dev->dev;
+
 	drive = &hwif->drives[0];
 	if (drive->present) {
 		drive->io_32bit = 1;
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux