]> git.sur5r.net Git - groeck-nct6775/blobdiff - lm75.h
hwmon: (nct6775) Introduce separate temperature labels for NCT6792 and NCT6793
[groeck-nct6775] / 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)
 {
-       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);
 }