diff options
Diffstat (limited to 'drivers/hwmon/lm73.c')
-rw-r--r-- | drivers/hwmon/lm73.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/lm73.c b/drivers/hwmon/lm73.c index 7272176a9ec7..5166a8e3a061 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, | |||
56 | return status; | 56 | return status; |
57 | 57 | ||
58 | /* Write value */ | 58 | /* Write value */ |
59 | value = (short) SENSORS_LIMIT(temp/250, (LM73_TEMP_MIN*4), | 59 | value = (short) clamp_val(temp / 250, LM73_TEMP_MIN * 4, |
60 | (LM73_TEMP_MAX*4)) << 5; | 60 | LM73_TEMP_MAX * 4) << 5; |
61 | err = i2c_smbus_write_word_swapped(client, attr->index, value); | 61 | err = i2c_smbus_write_word_swapped(client, attr->index, value); |
62 | return (err < 0) ? err : count; | 62 | return (err < 0) ? err : count; |
63 | } | 63 | } |