summaryrefslogtreecommitdiff
path: root/drivers/hwmon/lm73.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon/lm73.c')
-rw-r--r--drivers/hwmon/lm73.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/lm73.c b/drivers/hwmon/lm73.c
index 7272176..5166a8e3 100644
--- a/drivers/hwmon/lm73.c
+++ b/drivers/hwmon/lm73.c
@@ -56,8 +56,8 @@ static ssize_t set_temp(struct device *dev, struct device_attribute *da,
return status;
/* Write value */
- value = (short) SENSORS_LIMIT(temp/250, (LM73_TEMP_MIN*4),
- (LM73_TEMP_MAX*4)) << 5;
+ value = (short) clamp_val(temp / 250, LM73_TEMP_MIN * 4,
+ LM73_TEMP_MAX * 4) << 5;
err = i2c_smbus_write_word_swapped(client, attr->index, value);
return (err < 0) ? err : count;
}