summaryrefslogtreecommitdiffstats
path: root/drivers/ide/cmd64x.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 17:20:55 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 17:20:55 +0100
commit5d44a1502ff711bea2a9b2bf2fbd2503081cf3be (patch)
tree6355ee120a08c052f9cc777caddcf607ab4d2986 /drivers/ide/cmd64x.c
parent2b78ff52354b7271b9221ca2c14c54f627c649fa (diff)
downloadlinux-5d44a1502ff711bea2a9b2bf2fbd2503081cf3be.tar.bz2
cmd64x: 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>
Diffstat (limited to 'drivers/ide/cmd64x.c')
-rw-r--r--drivers/ide/cmd64x.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/ide/cmd64x.c b/drivers/ide/cmd64x.c
index d1fc198719b2..265cf9268c63 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... */