projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21fc977
)
hwmon: (w83795) Fix LSB reading of voltage limits
author
Jean Delvare
<khali@linux-fr.org>
Thu, 28 Oct 2010 18:31:49 +0000
(20:31 +0200)
committer
Jean Delvare
<khali@endymion.delvare>
Thu, 28 Oct 2010 18:31:49 +0000
(20:31 +0200)
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>
drivers/hwmon/w83795.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/w83795.c
b/drivers/hwmon/w83795.c
index e916c04e86813641b150759240bd630e55dfd4dc..9d73768060d40dfeb8dc4180235730af664e9777 100644
(file)
--- 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)
lsb_idx = IN_LSB_SHIFT_IDX[index][IN_LSB_IDX];
val <<= 2;
val |= (data->in_lsb[lsb_idx][nr] >>
- IN_LSB_SHIFT_IDX[
lsb_id
x][IN_LSB_SHIFT]) & 0x03;
+ IN_LSB_SHIFT_IDX[
inde
x][IN_LSB_SHIFT]) & 0x03;
if ((index >= 17) &&
!((data->has_gain >> (index - 17)) & 1))
val *= 8;