aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-lib.c
diff options
context:
space:
mode:
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)