[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1302803767-9715-53-git-send-email-paul.gortmaker@windriver.com>
Date: Thu, 14 Apr 2011 13:55:24 -0400
From: Paul Gortmaker <paul.gortmaker@...driver.com>
To: stable@...nel.org, linux-kernel@...r.kernel.org
Cc: stable-review@...nel.org, Gabriele Gorla <gorlik@...guintown.net>,
Jean Delvare <khali@...ux-fr.org>,
Paul Gortmaker <paul.gortmaker@...driver.com>
Subject: [34-longterm 166/209] hwmon: (adm1026) Allow 1 as a valid divider value
From: Gabriele Gorla <gorlik@...guintown.net>
=====================================================================
| This is a commit scheduled for the next v2.6.34 longterm release. |
| If you see a problem with using this for longterm, please comment.|
=====================================================================
commit 8b0f1840a46449e1946fc88860ef3ec8d6b1c2c7 upstream.
Allow 1 as a valid div value as specified in the ADM1026 datasheet.
Signed-off-by: Gabriele Gorla <gorlik@...guintown.net>
Signed-off-by: Jean Delvare <khali@...ux-fr.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@...driver.com>
---
drivers/hwmon/adm1026.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c
index 65335b2..e059a5f 100644
--- 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);
--
1.7.4.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists