Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/ide-2.6
[linux-drm-fsl-dcu.git] / drivers / ide / cmd640.c
index cb11938ba684e7fd8865bfb5f1315118676d3578..d2b8b272bc27810a5dcfa4571e0eeb789ffd0e88 100644 (file)
@@ -572,9 +572,10 @@ static void cmd640_set_mode(ide_drive_t *drive, unsigned int index,
        program_drive_counts(drive, index);
 }
 
-static void cmd640_set_pio_mode(ide_drive_t *drive, const u8 pio)
+static void cmd640_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
 {
        unsigned int index = 0, cycle_time;
+       const u8 pio = drive->pio_mode - XFER_PIO_0;
        u8 b;
 
        switch (pio) {