]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ide-lib.c
bonding: fix race that causes invalid statistics
[linux-2.6-omap-h63xx.git] / drivers / ide / ide-lib.c
index 9b44fbdfe41fc503d085b6a0f08c1d3a9775d8fe..b42940d8bf70e68661412ba554967f9b8f160737 100644 (file)
@@ -358,8 +358,10 @@ void ide_toggle_bounce(ide_drive_t *drive, int on)
        if (!PCI_DMA_BUS_IS_PHYS) {
                addr = BLK_BOUNCE_ANY;
        } else if (on && drive->media == ide_disk) {
-               if (HWIF(drive)->pci_dev)
-                       addr = HWIF(drive)->pci_dev->dma_mask;
+               struct device *dev = drive->hwif->dev;
+
+               if (dev && dev->dma_mask)
+                       addr = *dev->dma_mask;
        }
 
        if (drive->queue)