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_cypress.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_cypress.c')
-rw-r--r-- | drivers/ata/pata_cypress.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c index a9c3218e22fd..2ff62608ae37 100644 --- a/drivers/ata/pata_cypress.c +++ b/drivers/ata/pata_cypress.c | |||
@@ -62,14 +62,14 @@ static void cy82c693_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
62 | return; | 62 | return; |
63 | } | 63 | } |
64 | 64 | ||
65 | time_16 = FIT(t.recover, 0, 15) | (FIT(t.active, 0, 15) << 4); | 65 | time_16 = clamp_val(t.recover, 0, 15) | (clamp_val(t.active, 0, 15) << 4); |
66 | time_8 = FIT(t.act8b, 0, 15) | (FIT(t.rec8b, 0, 15) << 4); | 66 | time_8 = clamp_val(t.act8b, 0, 15) | (clamp_val(t.rec8b, 0, 15) << 4); |
67 | 67 | ||
68 | if (adev->devno == 0) { | 68 | if (adev->devno == 0) { |
69 | pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); | 69 | pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); |
70 | 70 | ||
71 | addr &= ~0x0F; /* Mask bits */ | 71 | addr &= ~0x0F; /* Mask bits */ |
72 | addr |= FIT(t.setup, 0, 15); | 72 | addr |= clamp_val(t.setup, 0, 15); |
73 | 73 | ||
74 | pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr); | 74 | pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr); |
75 | pci_write_config_byte(pdev, CY82_IDE_MASTER_IOR, time_16); | 75 | pci_write_config_byte(pdev, CY82_IDE_MASTER_IOR, time_16); |
@@ -79,7 +79,7 @@ static void cy82c693_set_piomode(struct ata_port *ap, struct ata_device *adev) | |||
79 | pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); | 79 | pci_read_config_dword(pdev, CY82_IDE_ADDRSETUP, &addr); |
80 | 80 | ||
81 | addr &= ~0xF0; /* Mask bits */ | 81 | addr &= ~0xF0; /* Mask bits */ |
82 | addr |= (FIT(t.setup, 0, 15) << 4); | 82 | addr |= (clamp_val(t.setup, 0, 15) << 4); |
83 | 83 | ||
84 | pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr); | 84 | pci_write_config_dword(pdev, CY82_IDE_ADDRSETUP, addr); |
85 | pci_write_config_byte(pdev, CY82_IDE_SLAVE_IOR, time_16); | 85 | pci_write_config_byte(pdev, CY82_IDE_SLAVE_IOR, time_16); |