Skip to content

Commit

Permalink
cmd64x: use ide_get_pair_dev() helper
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 6, 2009
1 parent 2b78ff5 commit 5d44a15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/ide/cmd64x.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@ static void cmd64x_tune_pio(ide_drive_t *drive, const u8 pio)
* the slowest address setup timing ourselves.
*/
if (hwif->channel) {
ide_drive_t *drives = hwif->drives;
ide_drive_t *pair = ide_get_pair_dev(drive);

drive->drive_data = setup_count;
setup_count = max(drives[0].drive_data, drives[1].drive_data);

if (pair)
setup_count = max_t(u8, setup_count, pair->drive_data);
}

if (setup_count > 5) /* shouldn't actually happen... */
Expand Down

0 comments on commit 5d44a15

Please sign in to comment.