From 9ac1d40ae6ce630dcf4b32078fe6d458dad1de71 Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Sun, 27 Mar 2005 01:44:27 +0000 Subject: [PATCH] fix negative fan values. Patch from Chunhao. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2941 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/w83792d.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/chips/w83792d.c b/kernel/chips/w83792d.c index 56456bb0..1c97091d 100644 --- a/kernel/chips/w83792d.c +++ b/kernel/chips/w83792d.c @@ -1019,9 +1019,13 @@ void w83792d_fan(struct i2c_client *client, int operation, int ctl_name, } else if ((data->fan_div[nr])<0x07 && (data->fan[nr])==0xff) { (data->fan_div[nr])++; + results[1] = FAN_FROM_REG(data->fan[nr], + DIV_FROM_REG(data->fan_div[nr])); } else if ((data->fan_div[nr])>0 && (data->fan[nr])<0x78) { (data->fan_div[nr])--; + results[1] = FAN_FROM_REG(data->fan[nr], + DIV_FROM_REG(data->fan_div[nr])); } tmp_reg = w83792d_read_value(client,