diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:55 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:55 -0500 |
commit | 2b78ff52354b7271b9221ca2c14c54f627c649fa (patch) | |
tree | dbe384a9c0ecdce10630e21ca6493e7967a01833 | |
parent | bca4ff16e97f4413bade39a40ccf2e1451b4dc54 (diff) |
cmd640: use ide_get_pair_dev() helper
There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/cmd640.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/cmd640.c b/drivers/ide/cmd640.c index e4306647d00d..8890276fef7f 100644 --- a/drivers/ide/cmd640.c +++ b/drivers/ide/cmd640.c | |||
@@ -467,11 +467,10 @@ static void program_drive_counts(ide_drive_t *drive, unsigned int index) | |||
467 | * so we merge the timings, using the slowest value for each timing. | 467 | * so we merge the timings, using the slowest value for each timing. |
468 | */ | 468 | */ |
469 | if (index > 1) { | 469 | if (index > 1) { |
470 | ide_hwif_t *hwif = drive->hwif; | 470 | ide_drive_t *peer = ide_get_pair_dev(drive); |
471 | ide_drive_t *peer = &hwif->drives[!(drive->dn & 1)]; | ||
472 | unsigned int mate = index ^ 1; | 471 | unsigned int mate = index ^ 1; |
473 | 472 | ||
474 | if (peer->dev_flags & IDE_DFLAG_PRESENT) { | 473 | if (peer) { |
475 | if (setup_count < setup_counts[mate]) | 474 | if (setup_count < setup_counts[mate]) |
476 | setup_count = setup_counts[mate]; | 475 | setup_count = setup_counts[mate]; |
477 | if (active_count < active_counts[mate]) | 476 | if (active_count < active_counts[mate]) |