fix negative fan values. Patch from Chunhao.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2941 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Mark D. Studebaker committed 2005-03-27 01:44:27 +00:00
1 parent 72a3c7ac3b
commit 9ac1d40ae6
1 file changed
+4
+4
View File
@@ -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,