diff -u linux-mm/drivers/i2c/chips/via686a.c 2.5.73-mm1/drivers/i2c/chips/via686a.c
--- linux-mm/drivers/i2c/chips/via686a.c 2003-05-31 14:15:03.000000000 +0200
+++ 2.5.73-mm1/drivers/i2c/chips/via686a.c 2003-06-24 17:18:09.000000000 +0200
@@ -494,27 +494,27 @@
struct i2c_client *client = to_i2c_client(dev);
struct via686a_data *data = i2c_get_clientdata(client);
via686a_update_client(client);
- return sprintf(buf, "%ld\n", TEMP_FROM_REG10(data->temp[nr])*10 );
+ return sprintf(buf, "%ld\n", TEMP_FROM_REG10(data->temp[nr])*100 );
}
/* more like overshoot temperature */
static ssize_t show_temp_max(struct device *dev, char *buf, int nr) {
struct i2c_client *client = to_i2c_client(dev);
struct via686a_data *data = i2c_get_clientdata(client);
via686a_update_client(client);
- return sprintf(buf, "%ld\n", TEMP_FROM_REG(data->temp_over[nr])*10);
+ return sprintf(buf, "%ld\n", TEMP_FROM_REG(data->temp_over[nr])*100);
}
/* more like hysteresis temperature */
static ssize_t show_temp_min(struct device *dev, char *buf, int nr) {
struct i2c_client *client = to_i2c_client(dev);
struct via686a_data *data = i2c_get_clientdata(client);
via686a_update_client(client);
- return sprintf(buf, "%ld\n", TEMP_FROM_REG(data->temp_hyst[nr])*10);
+ return sprintf(buf, "%ld\n", TEMP_FROM_REG(data->temp_hyst[nr])*100);
}
static ssize_t set_temp_max(struct device *dev, const char *buf,
size_t count, int nr) {
struct i2c_client *client = to_i2c_client(dev);
struct via686a_data *data = i2c_get_clientdata(client);
- int val = simple_strtol(buf, NULL, 10)/10;
+ int val = simple_strtol(buf, NULL, 10)/100;
data->temp_over[nr] = TEMP_TO_REG(val);
via686a_write_value(client, VIA686A_REG_TEMP_OVER(nr), data->temp_over[nr]);
return count;
@@ -523,7 +523,7 @@
size_t count, int nr) {
struct i2c_client *client = to_i2c_client(dev);
struct via686a_data *data = i2c_get_clientdata(client);
- int val = simple_strtol(buf, NULL, 10)/10;
+ int val = simple_strtol(buf, NULL, 10)/100;
data->temp_hyst[nr] = TEMP_TO_REG(val);
via686a_write_value(client, VIA686A_REG_TEMP_HYST(nr), data->temp_hyst[nr]);
return count;
On Wed, Jun 25, 2003 at 09:25:11AM +0200, Jan Dittmer wrote:
> Forgot to send this.
>
> This converts the i2c chip driver via686a to handle milli degree celsius
> instead of centi degree celsius. Applies for temp_input, temp_min, temp_max.
Sorry for the delay, I've now applied this and will send it on.
thanks,
greg k-h