]> git.sur5r.net Git - groeck-nct6775/commitdiff
Replace SENSORS_LIMIT in lm75.h with clamp_val
authorGuenter Roeck <linux@roeck-us.net>
Wed, 1 May 2013 21:26:00 +0000 (14:26 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 1 May 2013 21:26:00 +0000 (14:26 -0700)
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
lm75.h

diff --git a/lm75.h b/lm75.h
index e547a3eb4de31ae03d12b3c17f6320d05df2504a..4519e4dd957f44f5a22b9f179664452c60e9ae65 100644 (file)
--- a/lm75.h
+++ b/lm75.h
@@ -36,7 +36,7 @@
    REG: (0.5C/bit, two's complement) << 7 */
 static inline u16 LM75_TEMP_TO_REG(long temp)
 {
    REG: (0.5C/bit, two's complement) << 7 */
 static inline u16 LM75_TEMP_TO_REG(long temp)
 {
-       int ntemp = SENSORS_LIMIT(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
+       int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
        ntemp += (ntemp<0 ? -250 : 250);
        return (u16)((ntemp / 500) << 7);
 }
        ntemp += (ntemp<0 ? -250 : 250);
        return (u16)((ntemp / 500) << 7);
 }