lkml.org 
[lkml]   [2011]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [16/139] hwmon: (adm1026) Allow 1 as a valid divider value
Date
2.6.35-longterm review patch.  If anyone has any objections, please let me know.

------------------
From: Gabriele Gorla <gorlik@penguintown.net>

commit 8b0f1840a46449e1946fc88860ef3ec8d6b1c2c7 upstream.

Allow 1 as a valid div value as specified in the ADM1026 datasheet.

Signed-off-by: Gabriele Gorla <gorlik@penguintown.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>

---
drivers/hwmon/adm1026.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

Index: linux-2.6.35.y/drivers/hwmon/adm1026.c
===================================================================
--- linux-2.6.35.y.orig/drivers/hwmon/adm1026.c
+++ linux-2.6.35.y/drivers/hwmon/adm1026.c
@@ -920,9 +920,7 @@ static ssize_t set_fan_div(struct device

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);

\
 
 \ /
  Last update: 2011-02-02 02:13    [W:0.264 / U:9.828 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site