aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ppc
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:40 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-16 14:33:40 -0400
commitc56c5648a3bd15ff14c50f284b261140cd5b5472 (patch)
tree94cdc14616143b5a51e5dc16901c4f431bacf83f /drivers/ide/ppc
parent63b51c6d1d63276fd320615c042f1ff5d94ebab8 (diff)
ide: set hwif->dev in ide_init_port_hw() (take 2)
* Add 'parent' field to hw_regs_t for optional parent device pointer (needed by macio PMAC IDE controllers) and set hwif->dev in ide_init_port_hw(). * Update au1xxx-ide.c, sgiioc4.c, pmac.c and setup-pci.c accordingly. v2: * Update scc_pata.c. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ppc')
-rw-r--r--drivers/ide/ppc/pmac.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index cfa103a51b31..93fb9067c043 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1148,8 +1148,6 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
1148 base = ioremap(macio_resource_start(mdev, 0), 0x400); 1148 base = ioremap(macio_resource_start(mdev, 0), 0x400);
1149 regbase = (unsigned long) base; 1149 regbase = (unsigned long) base;
1150 1150
1151 hwif->dev = &mdev->bus->pdev->dev;
1152
1153 pmif->mdev = mdev; 1151 pmif->mdev = mdev;
1154 pmif->node = mdev->ofdev.node; 1152 pmif->node = mdev->ofdev.node;
1155 pmif->regbase = regbase; 1153 pmif->regbase = regbase;
@@ -1171,7 +1169,8 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
1171 memset(&hw, 0, sizeof(hw)); 1169 memset(&hw, 0, sizeof(hw));
1172 pmac_ide_init_ports(&hw, pmif->regbase); 1170 pmac_ide_init_ports(&hw, pmif->regbase);
1173 hw.irq = irq; 1171 hw.irq = irq;
1174 hw.dev = &mdev->ofdev.dev; 1172 hw.dev = &mdev->bus->pdev->dev;
1173 hw.parent = &mdev->ofdev.dev;
1175 1174
1176 rc = pmac_ide_setup_device(pmif, hwif, &hw); 1175 rc = pmac_ide_setup_device(pmif, hwif, &hw);
1177 if (rc != 0) { 1176 if (rc != 0) {
@@ -1271,7 +1270,6 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1271 goto out_free_pmif; 1270 goto out_free_pmif;
1272 } 1271 }
1273 1272
1274 hwif->dev = &pdev->dev;
1275 pmif->mdev = NULL; 1273 pmif->mdev = NULL;
1276 pmif->node = np; 1274 pmif->node = np;
1277 1275