cmd640: use ide_get_pair_dev() helper

There should be no functional changes caused by this patch.
Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent bca4ff16
...@@ -467,11 +467,10 @@ static void program_drive_counts(ide_drive_t *drive, unsigned int index) ...@@ -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. * so we merge the timings, using the slowest value for each timing.
*/ */
if (index > 1) { if (index > 1) {
ide_hwif_t *hwif = drive->hwif; ide_drive_t *peer = ide_get_pair_dev(drive);
ide_drive_t *peer = &hwif->drives[!(drive->dn & 1)];
unsigned int mate = index ^ 1; unsigned int mate = index ^ 1;
if (peer->dev_flags & IDE_DFLAG_PRESENT) { if (peer) {
if (setup_count < setup_counts[mate]) if (setup_count < setup_counts[mate])
setup_count = setup_counts[mate]; setup_count = setup_counts[mate];
if (active_count < active_counts[mate]) if (active_count < active_counts[mate])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment