ide: keep pointer to struct device instead of struct pci_dev in ide_hwif_t
[deliverable/linux.git] / drivers / ide / pci / triflex.c
index a227c41d23a3110e0efaaec5cebe40ac7718cc2b..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));
This page took 0.038079 seconds and 5 git commands to generate.