From: Bartlomiej Zolnierkiewicz Date: Tue, 6 Jan 2009 16:20:55 +0000 (+0100) Subject: cmd64x: use ide_get_pair_dev() helper X-Git-Tag: v2.6.29-rc1~231^2~22 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5d44a1502ff711bea2a9b2bf2fbd2503081cf3be;p=profile%2Fivi%2Fkernel-x86-ivi.git cmd64x: use ide_get_pair_dev() helper There should be no functional changes caused by this patch. Acked-by: Sergei Shtylyov Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/cmd64x.c b/drivers/ide/cmd64x.c index d1fc198..265cf92 100644 --- a/drivers/ide/cmd64x.c +++ b/drivers/ide/cmd64x.c @@ -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... */