Revert "hwmon: (w83627ehf) Fix underflows seen when writing limit attributes"
This reverts commit c02c186774
.
This commit is contained in:
parent
c6e34888b5
commit
b6b1cfa179
1 changed files with 2 additions and 2 deletions
|
@ -897,7 +897,7 @@ store_target_temp(struct device *dev, struct device_attribute *attr,
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 127000), 1000);
|
val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 127);
|
||||||
|
|
||||||
mutex_lock(&data->update_lock);
|
mutex_lock(&data->update_lock);
|
||||||
data->target_temp[nr] = val;
|
data->target_temp[nr] = val;
|
||||||
|
@ -922,7 +922,7 @@ store_tolerance(struct device *dev, struct device_attribute *attr,
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
/* Limit the temp to 0C - 15C */
|
/* Limit the temp to 0C - 15C */
|
||||||
val = DIV_ROUND_CLOSEST(clamp_val(val, 0, 15000), 1000);
|
val = clamp_val(DIV_ROUND_CLOSEST(val, 1000), 0, 15);
|
||||||
|
|
||||||
mutex_lock(&data->update_lock);
|
mutex_lock(&data->update_lock);
|
||||||
reg = w83627ehf_read_value(data, W83627EHF_REG_TOLERANCE[nr]);
|
reg = w83627ehf_read_value(data, W83627EHF_REG_TOLERANCE[nr]);
|
||||||
|
|
Loading…
Reference in a new issue