]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ata/pata_ns87410.c
OMAP3 DSS: Fixed FIFO buffer register field sizes
[linux-2.6-omap-h63xx.git] / drivers / ata / pata_ns87410.c
index 76d2455bc453de3d446a13c329e115411bbd56c4..be756b7ef07e9a27d795e4b55731a1621940cd04 100644 (file)
@@ -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];