提交 8b0f1840 编写于 作者: G Gabriele Gorla 提交者: Jean Delvare

hwmon: (adm1026) Allow 1 as a valid divider value

Allow 1 as a valid div value as specified in the ADM1026 datasheet.
Signed-off-by: NGabriele Gorla <gorlik@penguintown.net>
Cc: stable@kernel.org
Signed-off-by: NJean Delvare <khali@linux-fr.org>
上级 52bc9802
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册