projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net: remove deprecated syststamp timestamp
[cascardo/linux.git]
/
drivers
/
hwmon
/
adt7470.c
diff --git
a/drivers/hwmon/adt7470.c
b/drivers/hwmon/adt7470.c
index
0f4dea5
..
9ee3913
100644
(file)
--- a/
drivers/hwmon/adt7470.c
+++ b/
drivers/hwmon/adt7470.c
@@
-515,7
+515,7
@@
static ssize_t set_temp_min(struct device *dev,
return -EINVAL;
temp = DIV_ROUND_CLOSEST(temp, 1000);
return -EINVAL;
temp = DIV_ROUND_CLOSEST(temp, 1000);
- temp = clamp_val(temp,
0, 255
);
+ temp = clamp_val(temp,
-128, 127
);
mutex_lock(&data->lock);
data->temp_min[attr->index] = temp;
mutex_lock(&data->lock);
data->temp_min[attr->index] = temp;
@@
-549,7
+549,7
@@
static ssize_t set_temp_max(struct device *dev,
return -EINVAL;
temp = DIV_ROUND_CLOSEST(temp, 1000);
return -EINVAL;
temp = DIV_ROUND_CLOSEST(temp, 1000);
- temp = clamp_val(temp,
0, 255
);
+ temp = clamp_val(temp,
-128, 127
);
mutex_lock(&data->lock);
data->temp_max[attr->index] = temp;
mutex_lock(&data->lock);
data->temp_max[attr->index] = temp;
@@
-826,7
+826,7
@@
static ssize_t set_pwm_tmin(struct device *dev,
return -EINVAL;
temp = DIV_ROUND_CLOSEST(temp, 1000);
return -EINVAL;
temp = DIV_ROUND_CLOSEST(temp, 1000);
- temp = clamp_val(temp,
0, 255
);
+ temp = clamp_val(temp,
-128, 127
);
mutex_lock(&data->lock);
data->pwm_tmin[attr->index] = temp;
mutex_lock(&data->lock);
data->pwm_tmin[attr->index] = temp;