mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-11 16:40:16 +00:00
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:
1 parent
72a3c7ac3b
commit
9ac1d40ae6
1 file changed
+4
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user