diff options
| -rw-r--r-- | drivers/hwmon/adm9240.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/adm9240.c index 98114cef1e43..2fe1828bd10b 100644 --- a/drivers/hwmon/adm9240.c +++ b/drivers/hwmon/adm9240.c | |||
| @@ -194,10 +194,10 @@ static struct adm9240_data *adm9240_update_device(struct device *dev) | |||
| 194 | * 0.5'C per two measurement cycles thus ignore possible | 194 | * 0.5'C per two measurement cycles thus ignore possible |
| 195 | * but unlikely aliasing error on lsb reading. --Grant | 195 | * but unlikely aliasing error on lsb reading. --Grant |
| 196 | */ | 196 | */ |
| 197 | data->temp = ((i2c_smbus_read_byte_data(client, | 197 | data->temp = (i2c_smbus_read_byte_data(client, |
| 198 | ADM9240_REG_TEMP) << 8) | | 198 | ADM9240_REG_TEMP) << 8) | |
| 199 | i2c_smbus_read_byte_data(client, | 199 | i2c_smbus_read_byte_data(client, |
| 200 | ADM9240_REG_TEMP_CONF)) / 128; | 200 | ADM9240_REG_TEMP_CONF); |
| 201 | 201 | ||
| 202 | for (i = 0; i < 2; i++) { /* read fans */ | 202 | for (i = 0; i < 2; i++) { /* read fans */ |
| 203 | data->fan[i] = i2c_smbus_read_byte_data(client, | 203 | data->fan[i] = i2c_smbus_read_byte_data(client, |
| @@ -263,7 +263,7 @@ static ssize_t show_temp(struct device *dev, struct device_attribute *dummy, | |||
| 263 | char *buf) | 263 | char *buf) |
| 264 | { | 264 | { |
| 265 | struct adm9240_data *data = adm9240_update_device(dev); | 265 | struct adm9240_data *data = adm9240_update_device(dev); |
| 266 | return sprintf(buf, "%d\n", data->temp * 500); /* 9-bit value */ | 266 | return sprintf(buf, "%d\n", data->temp / 128 * 500); /* 9-bit value */ |
| 267 | } | 267 | } |
| 268 | 268 | ||
| 269 | static ssize_t show_max(struct device *dev, struct device_attribute *devattr, | 269 | static ssize_t show_max(struct device *dev, struct device_attribute *devattr, |
