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>
This commit is contained in:
@@ -600,12 +600,11 @@ static u32 get_speed_setting(u8 speed, struct hpt_info *info)
|
||||
return (*info->settings)[i];
|
||||
}
|
||||
|
||||
static int hpt36x_tune_chipset(ide_drive_t *drive, u8 xferspeed)
|
||||
static int hpt36x_tune_chipset(ide_drive_t *drive, const u8 speed)
|
||||
{
|
||||
ide_hwif_t *hwif = HWIF(drive);
|
||||
struct pci_dev *dev = hwif->pci_dev;
|
||||
struct hpt_info *info = pci_get_drvdata(dev);
|
||||
u8 speed = ide_rate_filter(drive, xferspeed);
|
||||
u8 itr_addr = drive->dn ? 0x44 : 0x40;
|
||||
u32 old_itr = 0;
|
||||
u32 itr_mask, new_itr;
|
||||
@@ -628,12 +627,11 @@ static int hpt36x_tune_chipset(ide_drive_t *drive, u8 xferspeed)
|
||||
return ide_config_drive_speed(drive, speed);
|
||||
}
|
||||
|
||||
static int hpt37x_tune_chipset(ide_drive_t *drive, u8 xferspeed)
|
||||
static int hpt37x_tune_chipset(ide_drive_t *drive, const u8 speed)
|
||||
{
|
||||
ide_hwif_t *hwif = HWIF(drive);
|
||||
struct pci_dev *dev = hwif->pci_dev;
|
||||
struct hpt_info *info = pci_get_drvdata(dev);
|
||||
u8 speed = ide_rate_filter(drive, xferspeed);
|
||||
u8 itr_addr = 0x40 + (drive->dn * 4);
|
||||
u32 old_itr = 0;
|
||||
u32 itr_mask, new_itr;
|
||||
|
Reference in New Issue
Block a user