diff options
Diffstat (limited to 'drivers/ide/pci/via82cxxx.c')
-rw-r--r-- | drivers/ide/pci/via82cxxx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index 94fb9ab3223f..9cb531dc905a 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -154,7 +154,7 @@ static void via_set_speed(ide_hwif_t *hwif, u8 dn, struct ide_timing *timing) | |||
154 | static void via_set_drive(ide_drive_t *drive, const u8 speed) | 154 | static void via_set_drive(ide_drive_t *drive, const u8 speed) |
155 | { | 155 | { |
156 | ide_hwif_t *hwif = drive->hwif; | 156 | ide_hwif_t *hwif = drive->hwif; |
157 | ide_drive_t *peer = hwif->drives + (~drive->dn & 1); | 157 | ide_drive_t *peer = ide_get_pair_dev(drive); |
158 | struct pci_dev *dev = to_pci_dev(hwif->dev); | 158 | struct pci_dev *dev = to_pci_dev(hwif->dev); |
159 | struct ide_host *host = pci_get_drvdata(dev); | 159 | struct ide_host *host = pci_get_drvdata(dev); |
160 | struct via82cxxx_dev *vdev = host->host_priv; | 160 | struct via82cxxx_dev *vdev = host->host_priv; |
@@ -173,7 +173,7 @@ static void via_set_drive(ide_drive_t *drive, const u8 speed) | |||
173 | 173 | ||
174 | ide_timing_compute(drive, speed, &t, T, UT); | 174 | ide_timing_compute(drive, speed, &t, T, UT); |
175 | 175 | ||
176 | if (peer->present) { | 176 | if (peer) { |
177 | ide_timing_compute(peer, peer->current_speed, &p, T, UT); | 177 | ide_timing_compute(peer, peer->current_speed, &p, T, UT); |
178 | ide_timing_merge(&p, &t, &t, IDE_TIMING_8BIT); | 178 | ide_timing_merge(&p, &t, &t, IDE_TIMING_8BIT); |
179 | } | 179 | } |