From 6df0da79cfe772c168f86f7d8a3c3515d21223b1 Mon Sep 17 00:00:00 2001 From: Philip Edelbrock Date: Tue, 14 Sep 1999 04:55:28 +0000 Subject: [PATCH] (Phil) Some bug fixes. As far as I can tell, the THMC50 driver seems to be working perfectly. Of course, some real-world users might find something I didn't... BTW- I caught a minor bug which I thought was funny, and checked lm75.c to see if it was there from the start... and it was! So, I managed to catch a bug in lm75.c which might have resulted in bad temp_hyst readings during that short period between setting new limits and the next valid update. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@564 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/lm75.c | 4 ++-- kernel/chips/thmc50.c | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/kernel/chips/lm75.c b/kernel/chips/lm75.c index f32de3e6..37ebcff3 100644 --- a/kernel/chips/lm75.c +++ b/kernel/chips/lm75.c @@ -378,8 +378,8 @@ void lm75_temp(struct i2c_client *client, int operation, int ctl_name, lm75_write_value(client,LM75_REG_TEMP_OS,data->temp_os); } if (*nrels_mag >= 2) { - data->temp_os = TEMP_TO_REG(results[1]); - lm75_write_value(client,LM75_REG_TEMP_HYST,data->temp_os); + data->temp_hyst = TEMP_TO_REG(results[1]); + lm75_write_value(client,LM75_REG_TEMP_HYST,data->temp_hyst); } } } diff --git a/kernel/chips/thmc50.c b/kernel/chips/thmc50.c index 994c9d46..dd051cb9 100644 --- a/kernel/chips/thmc50.c +++ b/kernel/chips/thmc50.c @@ -420,8 +420,8 @@ void thmc50_temp(struct i2c_client *client, int operation, int ctl_name, thmc50_write_value(client,THMC50_REG_TEMP_OS,data->temp_os); } if (*nrels_mag >= 2) { - data->temp_os = TEMP_TO_REG(results[1]); - thmc50_write_value(client,THMC50_REG_TEMP_HYST,data->temp_os); + data->temp_hyst = TEMP_TO_REG(results[1]); + thmc50_write_value(client,THMC50_REG_TEMP_HYST,data->temp_hyst); } } } @@ -445,8 +445,8 @@ void thmc50_remote_temp(struct i2c_client *client, int operation, int ctl_name, thmc50_write_value(client,THMC50_REG_REMOTE_TEMP_OS,data->remote_temp_os); } if (*nrels_mag >= 2) { - data->remote_temp_os = TEMP_TO_REG(results[1]); - thmc50_write_value(client,THMC50_REG_REMOTE_TEMP_HYST,data->remote_temp_os); + data->remote_temp_hyst = TEMP_TO_REG(results[1]); + thmc50_write_value(client,THMC50_REG_REMOTE_TEMP_HYST,data->remote_temp_hyst); } } } @@ -480,7 +480,7 @@ void thmc50_inter_mask(struct i2c_client *client, int operation, int ctl_name, *nrels_mag = 1; } else if (operation == SENSORS_PROC_REAL_WRITE) { if (*nrels_mag >= 1) { - data->remote_temp_os = results[0]; + data->inter_mask = results[0]; thmc50_write_value(client,THMC50_REG_INTER_MASK,data->inter_mask); } } @@ -515,7 +515,7 @@ void thmc50_analog_out(struct i2c_client *client, int operation, int ctl_name, *nrels_mag = 1; } else if (operation == SENSORS_PROC_REAL_WRITE) { if (*nrels_mag >= 1) { - data->remote_temp_os = results[0]; + data->analog_out = results[0]; thmc50_write_value(client,THMC50_REG_ANALOG_OUT,data->analog_out); } }