diff options
author | Harvey Harrison <harvey.harrison@gmail.com> | 2008-05-14 19:17:00 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-05-19 17:30:32 -0400 |
commit | 07633b5d0723ce2ec31262e1096dcf61311bf078 (patch) | |
tree | d7df0c597f64b23d684e9cc492c8ee803acf21a2 /drivers/ata/pata_ns87415.c | |
parent | 06aaca3f6301d04463b1ee0eb75c0352147159f2 (diff) |
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_ns87415.c')
-rw-r--r-- | drivers/ata/pata_ns87415.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c index ae92b0049bd5..e0aa7eaaee0a 100644 --- a/drivers/ata/pata_ns87415.c +++ b/drivers/ata/pata_ns87415.c | |||
@@ -66,8 +66,8 @@ static void ns87415_set_mode(struct ata_port *ap, struct ata_device *adev, u8 mo | |||
66 | 66 | ||
67 | ata_timing_compute(adev, adev->pio_mode, &t, T, 0); | 67 | ata_timing_compute(adev, adev->pio_mode, &t, T, 0); |
68 | 68 | ||
69 | clocking = 17 - FIT(t.active, 2, 17); | 69 | clocking = 17 - clamp_val(t.active, 2, 17); |
70 | clocking |= (16 - FIT(t.recover, 1, 16)) << 4; | 70 | clocking |= (16 - clamp_val(t.recover, 1, 16)) << 4; |
71 | /* Use the same timing for read and write bytes */ | 71 | /* Use the same timing for read and write bytes */ |
72 | clocking |= (clocking << 8); | 72 | clocking |= (clocking << 8); |
73 | pci_write_config_word(dev, timing, clocking); | 73 | pci_write_config_word(dev, timing, clocking); |