]> Pileus Git - ~andy/linux/blobdiff - drivers/ide/ppc/pmac.c
ide: set hwif->dev in ide_init_port_hw() (take 2)
[~andy/linux] / drivers / ide / ppc / pmac.c
index cfa103a51b314e5ea8d3faf2425dd3e58c30b3d9..93fb9067c0430f7add87b99fa41f39f31ba0d4c5 100644 (file)
@@ -1148,8 +1148,6 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
        base = ioremap(macio_resource_start(mdev, 0), 0x400);
        regbase = (unsigned long) base;
 
-       hwif->dev = &mdev->bus->pdev->dev;
-
        pmif->mdev = mdev;
        pmif->node = mdev->ofdev.node;
        pmif->regbase = regbase;
@@ -1171,7 +1169,8 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
        memset(&hw, 0, sizeof(hw));
        pmac_ide_init_ports(&hw, pmif->regbase);
        hw.irq = irq;
-       hw.dev = &mdev->ofdev.dev;
+       hw.dev = &mdev->bus->pdev->dev;
+       hw.parent = &mdev->ofdev.dev;
 
        rc = pmac_ide_setup_device(pmif, hwif, &hw);
        if (rc != 0) {
@@ -1271,7 +1270,6 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)
                goto out_free_pmif;
        }
 
-       hwif->dev = &pdev->dev;
        pmif->mdev = NULL;
        pmif->node = np;