aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ppc/pmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ppc/pmac.c')
-rw-r--r--drivers/ide/ppc/pmac.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c
index 1d6af8824219..b17e097650b1 100644
--- a/drivers/ide/ppc/pmac.c
+++ b/drivers/ide/ppc/pmac.c
@@ -1200,7 +1200,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
1200 base = ioremap(macio_resource_start(mdev, 0), 0x400); 1200 base = ioremap(macio_resource_start(mdev, 0), 0x400);
1201 regbase = (unsigned long) base; 1201 regbase = (unsigned long) base;
1202 1202
1203 hwif->pci_dev = mdev->bus->pdev; 1203 hwif->dev = &mdev->bus->pdev->dev;
1204 1204
1205 pmif->mdev = mdev; 1205 pmif->mdev = mdev;
1206 pmif->node = mdev->ofdev.node; 1206 pmif->node = mdev->ofdev.node;
@@ -1315,7 +1315,7 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id)
1315 return -ENXIO; 1315 return -ENXIO;
1316 } 1316 }
1317 1317
1318 hwif->pci_dev = pdev; 1318 hwif->dev = &pdev->dev;
1319 pmif->mdev = NULL; 1319 pmif->mdev = NULL;
1320 pmif->node = np; 1320 pmif->node = np;
1321 1321
@@ -1725,10 +1725,12 @@ pmac_ide_dma_lost_irq (ide_drive_t *drive)
1725static void __devinit 1725static void __devinit
1726pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) 1726pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1727{ 1727{
1728 struct pci_dev *dev = to_pci_dev(hwif->dev);
1729
1728 /* We won't need pci_dev if we switch to generic consistent 1730 /* We won't need pci_dev if we switch to generic consistent
1729 * DMA routines ... 1731 * DMA routines ...
1730 */ 1732 */
1731 if (hwif->pci_dev == NULL) 1733 if (dev == NULL)
1732 return; 1734 return;
1733 /* 1735 /*
1734 * Allocate space for the DBDMA commands. 1736 * Allocate space for the DBDMA commands.
@@ -1736,7 +1738,7 @@ pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif)
1736 * aligning the start address to a multiple of 16 bytes. 1738 * aligning the start address to a multiple of 16 bytes.
1737 */ 1739 */
1738 pmif->dma_table_cpu = (struct dbdma_cmd*)pci_alloc_consistent( 1740 pmif->dma_table_cpu = (struct dbdma_cmd*)pci_alloc_consistent(
1739 hwif->pci_dev, 1741 dev,
1740 (MAX_DCMDS + 2) * sizeof(struct dbdma_cmd), 1742 (MAX_DCMDS + 2) * sizeof(struct dbdma_cmd),
1741 &hwif->dmatable_dma); 1743 &hwif->dmatable_dma);
1742 if (pmif->dma_table_cpu == NULL) { 1744 if (pmif->dma_table_cpu == NULL) {