diff --git a/[refs] b/[refs] index 1e9c804b0baa..5a7dd4d7043e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bca4ff16e97f4413bade39a40ccf2e1451b4dc54 +refs/heads/master: 2b78ff52354b7271b9221ca2c14c54f627c649fa diff --git a/trunk/drivers/ide/cmd640.c b/trunk/drivers/ide/cmd640.c index e4306647d00d..8890276fef7f 100644 --- a/trunk/drivers/ide/cmd640.c +++ b/trunk/drivers/ide/cmd640.c @@ -467,11 +467,10 @@ static void program_drive_counts(ide_drive_t *drive, unsigned int index) * so we merge the timings, using the slowest value for each timing. */ if (index > 1) { - ide_hwif_t *hwif = drive->hwif; - ide_drive_t *peer = &hwif->drives[!(drive->dn & 1)]; + ide_drive_t *peer = ide_get_pair_dev(drive); unsigned int mate = index ^ 1; - if (peer->dev_flags & IDE_DFLAG_PRESENT) { + if (peer) { if (setup_count < setup_counts[mate]) setup_count = setup_counts[mate]; if (active_count < active_counts[mate])