diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-01 17:09:31 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-02-01 17:09:31 -0500 |
commit | 36501650ec45b1db308c3b51886044863be2d762 (patch) | |
tree | 74cf9d9f313e510f8424f9bac35da8d61cce9f7b /drivers/ide/ppc/pmac.c | |
parent | f6fb786d6dcdd7d730e4fba620b071796f487e1b (diff) |
ide: keep pointer to struct device instead of struct pci_dev in ide_hwif_t
Keep pointer to struct device instead of struct pci_dev in ide_hwif_t.
While on it:
* Use *dev->dma_mask instead of pci_dev->dma_mask in ide_toggle_bounce().
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ppc/pmac.c')
-rw-r--r-- | drivers/ide/ppc/pmac.c | 10 |
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) | |||
1725 | static void __devinit | 1725 | static void __devinit |
1726 | pmac_ide_setup_dma(pmac_ide_hwif_t *pmif, ide_hwif_t *hwif) | 1726 | pmac_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) { |