diff options
Diffstat (limited to 'drivers/hwmon/thmc50.c')
-rw-r--r-- | drivers/hwmon/thmc50.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/thmc50.c b/drivers/hwmon/thmc50.c index 3c2c48d904e6..4b59eb53b18a 100644 --- a/drivers/hwmon/thmc50.c +++ b/drivers/hwmon/thmc50.c | |||
@@ -134,7 +134,7 @@ static ssize_t set_analog_out(struct device *dev, | |||
134 | return err; | 134 | return err; |
135 | 135 | ||
136 | mutex_lock(&data->update_lock); | 136 | mutex_lock(&data->update_lock); |
137 | data->analog_out = SENSORS_LIMIT(tmp, 0, 255); | 137 | data->analog_out = clamp_val(tmp, 0, 255); |
138 | i2c_smbus_write_byte_data(client, THMC50_REG_ANALOG_OUT, | 138 | i2c_smbus_write_byte_data(client, THMC50_REG_ANALOG_OUT, |
139 | data->analog_out); | 139 | data->analog_out); |
140 | 140 | ||
@@ -187,7 +187,7 @@ static ssize_t set_temp_min(struct device *dev, struct device_attribute *attr, | |||
187 | return err; | 187 | return err; |
188 | 188 | ||
189 | mutex_lock(&data->update_lock); | 189 | mutex_lock(&data->update_lock); |
190 | data->temp_min[nr] = SENSORS_LIMIT(val / 1000, -128, 127); | 190 | data->temp_min[nr] = clamp_val(val / 1000, -128, 127); |
191 | i2c_smbus_write_byte_data(client, THMC50_REG_TEMP_MIN[nr], | 191 | i2c_smbus_write_byte_data(client, THMC50_REG_TEMP_MIN[nr], |
192 | data->temp_min[nr]); | 192 | data->temp_min[nr]); |
193 | mutex_unlock(&data->update_lock); | 193 | mutex_unlock(&data->update_lock); |
@@ -216,7 +216,7 @@ static ssize_t set_temp_max(struct device *dev, struct device_attribute *attr, | |||
216 | return err; | 216 | return err; |
217 | 217 | ||
218 | mutex_lock(&data->update_lock); | 218 | mutex_lock(&data->update_lock); |
219 | data->temp_max[nr] = SENSORS_LIMIT(val / 1000, -128, 127); | 219 | data->temp_max[nr] = clamp_val(val / 1000, -128, 127); |
220 | i2c_smbus_write_byte_data(client, THMC50_REG_TEMP_MAX[nr], | 220 | i2c_smbus_write_byte_data(client, THMC50_REG_TEMP_MAX[nr], |
221 | data->temp_max[nr]); | 221 | data->temp_max[nr]); |
222 | mutex_unlock(&data->update_lock); | 222 | mutex_unlock(&data->update_lock); |