aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/tx4938ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/tx4938ide.c')
-rw-r--r--drivers/ide/tx4938ide.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
index fd59c0d235b5..1d80f1fdbc97 100644
--- a/drivers/ide/tx4938ide.c
+++ b/drivers/ide/tx4938ide.c
@@ -56,16 +56,15 @@ static void tx4938ide_tune_ebusc(unsigned int ebus_ch,
56 &tx4938_ebuscptr->cr[ebus_ch]); 56 &tx4938_ebuscptr->cr[ebus_ch]);
57} 57}
58 58
59static void tx4938ide_set_pio_mode(ide_drive_t *drive, const u8 pio) 59static void tx4938ide_set_pio_mode(ide_hwif_t *hwif, ide_drive_t *drive)
60{ 60{
61 ide_hwif_t *hwif = drive->hwif;
62 struct tx4938ide_platform_info *pdata = hwif->dev->platform_data; 61 struct tx4938ide_platform_info *pdata = hwif->dev->platform_data;
63 u8 safe = pio; 62 u8 safe = drive->pio_mode - XFER_PIO_0;
64 ide_drive_t *pair; 63 ide_drive_t *pair;
65 64
66 pair = ide_get_pair_dev(drive); 65 pair = ide_get_pair_dev(drive);
67 if (pair) 66 if (pair)
68 safe = min(safe, ide_get_best_pio_mode(pair, 255, 5)); 67 safe = min(safe, pair->pio_mode - XFER_PIO_0);
69 tx4938ide_tune_ebusc(pdata->ebus_ch, pdata->gbus_clock, safe); 68 tx4938ide_tune_ebusc(pdata->ebus_ch, pdata->gbus_clock, safe);
70} 69}
71 70