Fix bitmask in uch_config read and write.

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2287 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2004-02-12 21:55:34 +00:00
1 parent 1fe75068d1
commit 8591ddc174
2 files changed
+6 -6

No files matched your search

+3 -3
View File
@@ -779,13 +779,13 @@ void vt1211_uch(struct i2c_client *client, int operation, int ctl_name,
if (operation == SENSORS_PROC_REAL_INFO)
*nrels_mag = 0;
else if (operation == SENSORS_PROC_REAL_READ) {
results[0] = data->uch_config;
results[0] = data->uch_config & 0x7c;
*nrels_mag = 1;
} else if (operation == SENSORS_PROC_REAL_WRITE) {
if (*nrels_mag >= 1) {
data->uch_config = results[0] & 0x7c;
data->uch_config = (data->uch_config & 0x83)|(results[0] & 0x7c);
vt1211_write_value(client, VT1211_REG_UCH_CONFIG,
results[0] & 0x7c);
data->uch_config);
}
}
}
+3 -3
View File
@@ -751,13 +751,13 @@ void vt8231_uch(struct i2c_client *client, int operation, int ctl_name,
if (operation == SENSORS_PROC_REAL_INFO)
*nrels_mag = 0;
else if (operation == SENSORS_PROC_REAL_READ) {
results[0] = data->uch_config;
results[0] = data->uch_config & 0x7c;
*nrels_mag = 1;
} else if (operation == SENSORS_PROC_REAL_WRITE) {
if (*nrels_mag >= 1) {
data->uch_config = results[0] & 0x7c;
data->uch_config = (data->uch_config & 0x83)|(results[0] & 0x7c);
vt8231_write_value(client, VT8231_REG_UCH_CONFIG,
results[0] & 0x7c);
data->uch_config);
}
}
}