diff options
author | Borislav Petkov <bp@suse.de> | 2016-11-23 23:13:40 +0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2016-11-23 23:13:40 +0300 |
commit | 627bc29ed90ca50dbf7a4e7b43c267a2920bbadb (patch) | |
tree | 838d8aca5a04166b6ad74a2ef0f5291224768501 /drivers/hwmon/adm9240.c | |
parent | 044e7a414be9ba20826e5fd482214686193fe7b6 (diff) | |
parent | 3f5a7896a5096fd50030a04d4c3f28a7441e30a5 (diff) | |
download | linux-627bc29ed90ca50dbf7a4e7b43c267a2920bbadb.tar.xz |
Merge tip:ras/core to pick up dependent changes
tip:ras/core contains the respective Fam17h x86 RAS bits which
amd64_edac is going to use. So merge it into the EDAC branch.
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/hwmon/adm9240.c')
-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) * 0.5'C per two measurement cycles thus ignore possible * but unlikely aliasing error on lsb reading. --Grant */ - data->temp = ((i2c_smbus_read_byte_data(client, + data->temp = (i2c_smbus_read_byte_data(client, ADM9240_REG_TEMP) << 8) | i2c_smbus_read_byte_data(client, - ADM9240_REG_TEMP_CONF)) / 128; + ADM9240_REG_TEMP_CONF); for (i = 0; i < 2; i++) { /* read fans */ 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, char *buf) { struct adm9240_data *data = adm9240_update_device(dev); - return sprintf(buf, "%d\n", data->temp * 500); /* 9-bit value */ + return sprintf(buf, "%d\n", data->temp / 128 * 500); /* 9-bit value */ } static ssize_t show_max(struct device *dev, struct device_attribute *devattr, |