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_ali.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_ali.c')
-rw-r--r-- | drivers/ata/pata_ali.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index fcabe46f262b..0f3e659db99a 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c | |||
@@ -177,11 +177,11 @@ static void ali_program_modes(struct ata_port *ap, struct ata_device *adev, stru | |||
177 | u8 udma; | 177 | u8 udma; |
178 | 178 | ||
179 | if (t != NULL) { | 179 | if (t != NULL) { |
180 | t->setup = FIT(t->setup, 1, 8) & 7; | 180 | t->setup = clamp_val(t->setup, 1, 8) & 7; |
181 | t->act8b = FIT(t->act8b, 1, 8) & 7; | 181 | t->act8b = clamp_val(t->act8b, 1, 8) & 7; |
182 | t->rec8b = FIT(t->rec8b, 1, 16) & 15; | 182 | t->rec8b = clamp_val(t->rec8b, 1, 16) & 15; |
183 | t->active = FIT(t->active, 1, 8) & 7; | 183 | t->active = clamp_val(t->active, 1, 8) & 7; |
184 | t->recover = FIT(t->recover, 1, 16) & 15; | 184 | t->recover = clamp_val(t->recover, 1, 16) & 15; |
185 | 185 | ||
186 | pci_write_config_byte(pdev, cas, t->setup); | 186 | pci_write_config_byte(pdev, cas, t->setup); |
187 | pci_write_config_byte(pdev, cbt, (t->act8b << 4) | t->rec8b); | 187 | pci_write_config_byte(pdev, cbt, (t->act8b << 4) | t->rec8b); |