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/hpt366.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/hpt366.c')
-rw-r--r-- | drivers/ide/pci/hpt366.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 18c8ad091eb3..67127ac3a14a 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -600,12 +600,11 @@ static u32 get_speed_setting(u8 speed, struct hpt_info *info) | |||
600 | return (*info->settings)[i]; | 600 | return (*info->settings)[i]; |
601 | } | 601 | } |
602 | 602 | ||
603 | static int hpt36x_tune_chipset(ide_drive_t *drive, u8 xferspeed) | 603 | static int hpt36x_tune_chipset(ide_drive_t *drive, const u8 speed) |
604 | { | 604 | { |
605 | ide_hwif_t *hwif = HWIF(drive); | 605 | ide_hwif_t *hwif = HWIF(drive); |
606 | struct pci_dev *dev = hwif->pci_dev; | 606 | struct pci_dev *dev = hwif->pci_dev; |
607 | struct hpt_info *info = pci_get_drvdata(dev); | 607 | struct hpt_info *info = pci_get_drvdata(dev); |
608 | u8 speed = ide_rate_filter(drive, xferspeed); | ||
609 | u8 itr_addr = drive->dn ? 0x44 : 0x40; | 608 | u8 itr_addr = drive->dn ? 0x44 : 0x40; |
610 | u32 old_itr = 0; | 609 | u32 old_itr = 0; |
611 | u32 itr_mask, new_itr; | 610 | u32 itr_mask, new_itr; |
@@ -628,12 +627,11 @@ static int hpt36x_tune_chipset(ide_drive_t *drive, u8 xferspeed) | |||
628 | return ide_config_drive_speed(drive, speed); | 627 | return ide_config_drive_speed(drive, speed); |
629 | } | 628 | } |
630 | 629 | ||
631 | static int hpt37x_tune_chipset(ide_drive_t *drive, u8 xferspeed) | 630 | static int hpt37x_tune_chipset(ide_drive_t *drive, const u8 speed) |
632 | { | 631 | { |
633 | ide_hwif_t *hwif = HWIF(drive); | 632 | ide_hwif_t *hwif = HWIF(drive); |
634 | struct pci_dev *dev = hwif->pci_dev; | 633 | struct pci_dev *dev = hwif->pci_dev; |
635 | struct hpt_info *info = pci_get_drvdata(dev); | 634 | struct hpt_info *info = pci_get_drvdata(dev); |
636 | u8 speed = ide_rate_filter(drive, xferspeed); | ||
637 | u8 itr_addr = 0x40 + (drive->dn * 4); | 635 | u8 itr_addr = 0x40 + (drive->dn * 4); |
638 | u32 old_itr = 0; | 636 | u32 old_itr = 0; |
639 | u32 itr_mask, new_itr; | 637 | u32 itr_mask, new_itr; |