diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-11 17:54:02 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-11 17:54:02 -0400 |
commit | 8f4dd2e42637fd61a6366d2cace69091926eaa15 (patch) | |
tree | 38dc8e475afc27c575ff7f3701e57d5c9e3a9be9 /drivers/ide/ide-lib.c | |
parent | 0d3be723cb6432e384267d0fe83ee0bae5e17846 (diff) |
ide: use only ->set_pio_mode method for programming PIO modes (take 2)
Use ->set_pio_mode method to program PIO modes in ide_set_xfer_rate()
(the only place which used ->speedproc to program PIO modes) and remove
handling of PIO modes from all ->speedproc implementations.
v2:
* Fix pmac_ide_tune_chipset() comment.
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-lib.c')
-rw-r--r-- | drivers/ide/ide-lib.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/ide/ide-lib.c b/drivers/ide/ide-lib.c index 8400b1b4aa1b..d97390c0543b 100644 --- a/drivers/ide/ide-lib.c +++ b/drivers/ide/ide-lib.c | |||
@@ -398,6 +398,18 @@ int ide_set_xfer_rate(ide_drive_t *drive, u8 rate) | |||
398 | 398 | ||
399 | rate = ide_rate_filter(drive, rate); | 399 | rate = ide_rate_filter(drive, rate); |
400 | 400 | ||
401 | if (rate >= XFER_PIO_0 && rate <= XFER_PIO_5) { | ||
402 | if (hwif->set_pio_mode) | ||
403 | hwif->set_pio_mode(drive, rate - XFER_PIO_0); | ||
404 | |||
405 | /* | ||
406 | * FIXME: this is incorrect to return zero here but | ||
407 | * since all users of ide_set_xfer_rate() ignore | ||
408 | * the return value it is not a problem currently | ||
409 | */ | ||
410 | return 0; | ||
411 | } | ||
412 | |||
401 | return hwif->speedproc(drive, rate); | 413 | return hwif->speedproc(drive, rate); |
402 | } | 414 | } |
403 | 415 | ||