aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cs5520.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-11 17:53:59 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-11 17:53:59 -0400
commitf212ff28f08e4ddcef9f25b13463c45cc4204a0c (patch)
treee8fe63044c2ebec404689cbd55d75497aa77da0a /drivers/ide/pci/cs5520.c
parent3160d5416f39da9d9221fec7cb9d64399b706bbc (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/cs5520.c')
-rw-r--r--drivers/ide/pci/cs5520.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index 507981042c82..af67438328a8 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -66,16 +66,15 @@ static struct pio_clocks cs5520_pio_clocks[]={
66 {1, 2, 1} 66 {1, 2, 1}
67}; 67};
68 68
69static int cs5520_tune_chipset(ide_drive_t *drive, u8 xferspeed) 69static int cs5520_tune_chipset(ide_drive_t *drive, const u8 speed)
70{ 70{
71 ide_hwif_t *hwif = HWIF(drive); 71 ide_hwif_t *hwif = HWIF(drive);
72 struct pci_dev *pdev = hwif->pci_dev; 72 struct pci_dev *pdev = hwif->pci_dev;
73 u8 speed = ide_rate_filter(drive, xferspeed);
74 int pio = speed; 73 int pio = speed;
75 u8 reg; 74 u8 reg;
76 int controller = drive->dn > 1 ? 1 : 0; 75 int controller = drive->dn > 1 ? 1 : 0;
77 int error; 76 int error;
78 77
79 switch(speed) 78 switch(speed)
80 { 79 {
81 case XFER_PIO_4: 80 case XFER_PIO_4: