fbdev: move FBIO_WAITFORVSYNC to linux/fb.h
[safe/jmp/linux-2.6] / drivers / ide / cmd640.c
index cb11938..cb10201 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) {
@@ -632,12 +633,10 @@ static void __init cmd640_init_dev(ide_drive_t *drive)
 
 static int cmd640_test_irq(ide_hwif_t *hwif)
 {
-       struct pci_dev *dev     = to_pci_dev(hwif->dev);
        int irq_reg             = hwif->channel ? ARTTIM23 : CFR;
-       u8  irq_stat, irq_mask  = hwif->channel ? ARTTIM23_IDE23INTR :
+       u8  irq_mask            = hwif->channel ? ARTTIM23_IDE23INTR :
                                                  CFR_IDE01INTR;
-
-       pci_read_config_byte(dev, irq_reg, &irq_stat);
+       u8  irq_stat            = get_cmd640_reg(irq_reg);
 
        return (irq_stat & irq_mask) ? 1 : 0;
 }