aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/lm75.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/lm75.h')
-rw-r--r--drivers/hwmon/lm75.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/lm75.h b/drivers/hwmon/lm75.h
index 89aa9098ba5b..668ff4721323 100644
--- a/drivers/hwmon/lm75.h
+++ b/drivers/hwmon/lm75.h
@@ -36,7 +36,7 @@
36 REG: (0.5C/bit, two's complement) << 7 */ 36 REG: (0.5C/bit, two's complement) << 7 */
37static inline u16 LM75_TEMP_TO_REG(long temp) 37static inline u16 LM75_TEMP_TO_REG(long temp)
38{ 38{
39 int ntemp = SENSORS_LIMIT(temp, LM75_TEMP_MIN, LM75_TEMP_MAX); 39 int ntemp = clamp_val(temp, LM75_TEMP_MIN, LM75_TEMP_MAX);
40 ntemp += (ntemp < 0 ? -250 : 250); 40 ntemp += (ntemp < 0 ? -250 : 250);
41 return (u16)((ntemp / 500) << 7); 41 return (u16)((ntemp / 500) << 7);
42} 42}