aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:31 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-01 17:09:31 -0500
commit36501650ec45b1db308c3b51886044863be2d762 (patch)
tree74cf9d9f313e510f8424f9bac35da8d61cce9f7b /drivers/ide/ide-lib.c
parentf6fb786d6dcdd7d730e4fba620b071796f487e1b (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/ide-lib.c')
-rw-r--r--drivers/ide/ide-lib.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c
index 9b44fbdfe41f..b42940d8bf70 100644
--- a/drivers/ide/ide-lib.c
+++ b/drivers/ide/ide-lib.c
@@ -358,8 +358,10 @@ void ide_toggle_bounce(ide_drive_t *drive, int on)
358 if (!PCI_DMA_BUS_IS_PHYS) { 358 if (!PCI_DMA_BUS_IS_PHYS) {
359 addr = BLK_BOUNCE_ANY; 359 addr = BLK_BOUNCE_ANY;
360 } else if (on && drive->media == ide_disk) { 360 } else if (on && drive->media == ide_disk) {
361 if (HWIF(drive)->pci_dev) 361 struct device *dev = drive->hwif->dev;
362 addr = HWIF(drive)->pci_dev->dma_mask; 362
363 if (dev && dev->dma_mask)
364 addr = *dev->dma_mask;
363 } 365 }
364 366
365 if (drive->queue) 367 if (drive->queue)