Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / drivers / ide / pmac.c
index a167968..159955d 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/adb.h>
 #include <linux/pmu.h>
 #include <linux/scatterlist.h>
+#include <linux/slab.h>
 
 #include <asm/prom.h>
 #include <asm/io.h>
@@ -777,14 +778,14 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
 #endif 
 }
 
-static void pmac_ide_set_dma_mode(ide_drive_t *drive, const u8 speed)
+static void pmac_ide_set_dma_mode(ide_hwif_t *hwif, ide_drive_t *drive)
 {
-       ide_hwif_t *hwif = drive->hwif;
        pmac_ide_hwif_t *pmif =
                (pmac_ide_hwif_t *)dev_get_drvdata(hwif->gendev.parent);
        int ret = 0;
        u32 *timings, *timings2, tl[2];
        u8 unit = drive->dn & 1;
+       const u8 speed = drive->dma_mode;
 
        timings = &pmif->timings[unit];
        timings2 = &pmif->timings[unit+2];
@@ -1650,8 +1651,8 @@ pmac_ide_dma_test_irq (ide_drive_t *drive)
                if ((status & FLUSH) == 0)
                        break;
                if (++timeout > 100) {
-                       printk(KERN_WARNING "ide%d, ide_dma_test_irq \
-                       timeout flushing channel\n", hwif->index);
+                       printk(KERN_WARNING "ide%d, ide_dma_test_irq timeout flushing channel\n",
+                              hwif->index);
                        break;
                }
        }