summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/max16065.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/max16065.c')
-rw-r--r--drivers/hwmon/max16065.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/max16065.c b/drivers/hwmon/max16065.c
index e0019c69d1bb..2fa2c02f5569 100644
--- a/drivers/hwmon/max16065.c
+++ b/drivers/hwmon/max16065.c
@@ -118,7 +118,7 @@ static inline int LIMIT_TO_MV(int limit, int range)
static inline int MV_TO_LIMIT(int mv, int range)
{
- return SENSORS_LIMIT(DIV_ROUND_CLOSEST(mv * 256, range), 0, 255);
+ return clamp_val(DIV_ROUND_CLOSEST(mv * 256, range), 0, 255);
}
static inline int ADC_TO_CURR(int adc, int gain)