ide: keep pointer to struct device instead of struct pci_dev in ide_hwif_t
[deliverable/linux.git] / drivers / ide / pci / triflex.c
index 30b52f62699a9f1fc40121f33109635c06880b88..ca49cd7f9555652748a8f2d1f315f4ed4829b938 100644 (file)
@@ -43,7 +43,7 @@
 static void triflex_set_mode(ide_drive_t *drive, const u8 speed)
 {
        ide_hwif_t *hwif = HWIF(drive);
-       struct pci_dev *dev = hwif->pci_dev;
+       struct pci_dev *dev = to_pci_dev(hwif->dev);
        u8 channel_offset = hwif->channel ? 0x74 : 0x70;
        u16 timing = 0;
        u32 triflex_timings = 0;
@@ -81,8 +81,6 @@ static void triflex_set_mode(ide_drive_t *drive, const u8 speed)
                case XFER_PIO_0:
                        timing = 0x0808;
                        break;
-               default:
-                       return;
        }
 
        triflex_timings &= ~(0xFFFF << (16 * unit));
@@ -102,7 +100,7 @@ static void __devinit init_hwif_triflex(ide_hwif_t *hwif)
        hwif->set_dma_mode = &triflex_set_mode;
 }
 
-static ide_pci_device_t triflex_device __devinitdata = {
+static const struct ide_port_info triflex_device __devinitdata = {
        .name           = "TRIFLEX",
        .init_hwif      = init_hwif_triflex,
        .enablebits     = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}},
This page took 0.02636 seconds and 5 git commands to generate.