projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52bc980
)
hwmon: (adm1026) Allow 1 as a valid divider value
author
Gabriele Gorla
<gorlik@penguintown.net>
Wed, 8 Dec 2010 15:27:22 +0000
(16:27 +0100)
committer
Jean Delvare
<khali@endymion.delvare>
Wed, 8 Dec 2010 15:27:22 +0000
(16:27 +0100)
Allow 1 as a valid div value as specified in the ADM1026 datasheet.
Signed-off-by: Gabriele Gorla <gorlik@penguintown.net>
Cc: stable@kernel.org
Signed-off-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/adm1026.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/adm1026.c
b/drivers/hwmon/adm1026.c
index 6f257ce1ae079f89147ee655121ad9c30efb8200..be0fdd58aa29301fbe15f9186580d724ba769544 100644
(file)
--- a/
drivers/hwmon/adm1026.c
+++ b/
drivers/hwmon/adm1026.c
@@
-920,9
+920,7
@@
static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr,
val = simple_strtol(buf, NULL, 10);
new_div = DIV_TO_REG(val);
- if (new_div == 0) {
- return -EINVAL;
- }
+
mutex_lock(&data->update_lock);
orig_div = data->fan_div[nr];
data->fan_div[nr] = DIV_FROM_REG(new_div);