diff options
Diffstat (limited to 'drivers/ide/tx4938ide.c')
-rw-r--r-- | drivers/ide/tx4938ide.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c index ea89fddeed91..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 | ||
59 | static void tx4938ide_set_pio_mode(ide_drive_t *drive, const u8 pio) | 59 | static 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 | ||
@@ -146,7 +145,7 @@ static int __init tx4938ide_probe(struct platform_device *pdev) | |||
146 | return -ENODEV; | 145 | return -ENODEV; |
147 | 146 | ||
148 | if (!devm_request_mem_region(&pdev->dev, res->start, | 147 | if (!devm_request_mem_region(&pdev->dev, res->start, |
149 | res->end - res->start + 1, "tx4938ide")) | 148 | resource_size(res), "tx4938ide")) |
150 | return -EBUSY; | 149 | return -EBUSY; |
151 | mapbase = (unsigned long)devm_ioremap(&pdev->dev, res->start, | 150 | mapbase = (unsigned long)devm_ioremap(&pdev->dev, res->start, |
152 | 8 << pdata->ioport_shift); | 151 | 8 << pdata->ioport_shift); |