mirror of
https://github.com/S3NEO/android_kernel_samsung_msm8226.git
synced 2024-11-07 03:47:13 +00:00
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: Gabriele Gorla <gorlik@penguintown.net> Cc: stable@kernel.org Signed-off-by: Jean Delvare <khali@linux-fr.org>
This commit is contained in:
parent
52bc9802ce
commit
8b0f1840a4
1 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue