X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lm75.h;h=4519e4dd957f44f5a22b9f179664452c60e9ae65;hb=8d3a8abc1c94c552827b86e04d4f18fe49a9b968;hp=e547a3eb4de31ae03d12b3c17f6320d05df2504a;hpb=9cf9f2ec36c2734bb8f681b032d62da02b7dce6b;p=groeck-nct6775 diff --git a/lm75.h b/lm75.h index e547a3e..4519e4d 100644 --- 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); }