diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-11 17:53:59 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-11 17:53:59 -0400 |
commit | f212ff28f08e4ddcef9f25b13463c45cc4204a0c (patch) | |
tree | e8fe63044c2ebec404689cbd55d75497aa77da0a /drivers/ide/pci/via82cxxx.c | |
parent | 3160d5416f39da9d9221fec7cb9d64399b706bbc (diff) |
ide: move ide_rate_filter() calls to the upper layer (take 2)
* Move ide_rate_filter() calls from host drivers to IDE core.
* Make ide_rate_filter() static.
* Make 'speed' argument of ->speedproc const.
v2:
* Fix it8213_tune_chipset() comment.
There should be no functionality 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/pci/via82cxxx.c')
-rw-r--r-- | drivers/ide/pci/via82cxxx.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index ec9ad6e0e1f6..e3bf90736332 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -158,15 +158,13 @@ static void via_set_speed(ide_hwif_t *hwif, u8 dn, struct ide_timing *timing) | |||
158 | * by upper layers. | 158 | * by upper layers. |
159 | */ | 159 | */ |
160 | 160 | ||
161 | static int via_set_drive(ide_drive_t *drive, u8 speed) | 161 | static int via_set_drive(ide_drive_t *drive, const u8 speed) |
162 | { | 162 | { |
163 | ide_drive_t *peer = HWIF(drive)->drives + (~drive->dn & 1); | 163 | ide_drive_t *peer = HWIF(drive)->drives + (~drive->dn & 1); |
164 | struct via82cxxx_dev *vdev = pci_get_drvdata(drive->hwif->pci_dev); | 164 | struct via82cxxx_dev *vdev = pci_get_drvdata(drive->hwif->pci_dev); |
165 | struct ide_timing t, p; | 165 | struct ide_timing t, p; |
166 | unsigned int T, UT; | 166 | unsigned int T, UT; |
167 | 167 | ||
168 | speed = ide_rate_filter(drive, speed); | ||
169 | |||
170 | if (speed != XFER_PIO_SLOW) | 168 | if (speed != XFER_PIO_SLOW) |
171 | ide_config_drive_speed(drive, speed); | 169 | ide_config_drive_speed(drive, speed); |
172 | 170 | ||