diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-10-28 14:31:49 -0400 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2010-10-28 14:31:49 -0400 |
commit | 5d2cd958f777e533fa2809527836996f59b2d823 (patch) | |
tree | abc216b782d2c43236b8eecaa7bba4343530d43d /drivers/hwmon/w83795.c | |
parent | 21fc977551da43ec21ae0ebb859411afd4243d2b (diff) |
hwmon: (w83795) Fix LSB reading of voltage limits
Wrong index caused the wrong register value to be read, resulting in
random LSB for voltage limits.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/hwmon/w83795.c')
-rw-r--r-- | drivers/hwmon/w83795.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/w83795.c b/drivers/hwmon/w83795.c index e916c04e8681..9d73768060d4 100644 --- a/drivers/hwmon/w83795.c +++ b/drivers/hwmon/w83795.c | |||
@@ -1405,7 +1405,7 @@ show_in(struct device *dev, struct device_attribute *attr, char *buf) | |||
1405 | lsb_idx = IN_LSB_SHIFT_IDX[index][IN_LSB_IDX]; | 1405 | lsb_idx = IN_LSB_SHIFT_IDX[index][IN_LSB_IDX]; |
1406 | val <<= 2; | 1406 | val <<= 2; |
1407 | val |= (data->in_lsb[lsb_idx][nr] >> | 1407 | val |= (data->in_lsb[lsb_idx][nr] >> |
1408 | IN_LSB_SHIFT_IDX[lsb_idx][IN_LSB_SHIFT]) & 0x03; | 1408 | IN_LSB_SHIFT_IDX[index][IN_LSB_SHIFT]) & 0x03; |
1409 | if ((index >= 17) && | 1409 | if ((index >= 17) && |
1410 | !((data->has_gain >> (index - 17)) & 1)) | 1410 | !((data->has_gain >> (index - 17)) & 1)) |
1411 | val *= 8; | 1411 | val *= 8; |