summaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_ns87410.c
diff options
context:
space:
mode:
authorHarvey Harrison2008-05-15 01:17:00 +0200
committerJeff Garzik2008-05-19 23:30:32 +0200
commit07633b5d0723ce2ec31262e1096dcf61311bf078 (patch)
treed7df0c597f64b23d684e9cc492c8ee803acf21a2 /drivers/ata/pata_ns87410.c
parentsata_mv: ensure empty request queue for FBS-NCQ EH (diff)
downloadkernel-qcow2-linux-07633b5d0723ce2ec31262e1096dcf61311bf078.tar.gz
kernel-qcow2-linux-07633b5d0723ce2ec31262e1096dcf61311bf078.tar.xz
kernel-qcow2-linux-07633b5d0723ce2ec31262e1096dcf61311bf078.zip
ata: remove FIT() macro
Use the kernel-provided clamp_val() macro. FIT was always applied to a member of struct ata_timing (unsigned short) and two constants. clamp_val will not cast to short anymore. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Jeff Garzik <jeff@garzik.org> Cc: Tejun Heo <htejun@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_ns87410.c')
-rw-r--r--drivers/ata/pata_ns87410.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c
index 76d2455bc453..be756b7ef07e 100644
--- a/drivers/ata/pata_ns87410.c
+++ b/drivers/ata/pata_ns87410.c
@@ -91,9 +91,9 @@ static void ns87410_set_piomode(struct ata_port *ap, struct ata_device *adev)
return;
}
- at.active = FIT(at.active, 2, 16) - 2;
- at.setup = FIT(at.setup, 1, 4) - 1;
- at.recover = FIT(at.recover, 1, 12) - 1;
+ at.active = clamp_val(at.active, 2, 16) - 2;
+ at.setup = clamp_val(at.setup, 1, 4) - 1;
+ at.recover = clamp_val(at.recover, 1, 12) - 1;
idetcr = (at.setup << 6) | (recoverbits[at.recover] << 3) | activebits[at.active];