projects
/
sdk
/
emulator
/
emulator-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ddf2835
)
hwmon: (max16065) Fix current calculation
author
Guenter Roeck
<guenter.roeck@ericsson.com>
Sun, 28 Aug 2011 20:01:49 +0000
(13:01 -0700)
committer
Guenter Roeck
<guenter.roeck@ericsson.com>
Tue, 6 Sep 2011 15:56:06 +0000
(08:56 -0700)
Current calculation is completely wrong. Add missing brackets to fix it.
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: stable@kernel.org # 3.0+
drivers/hwmon/max16065.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/max16065.c
b/drivers/hwmon/max16065.c
index d94a24fdf4ba2a07ad006ebeae536745d5e1a25d..dd2d7b9620c2bde5bb8cac1a2c8ac48879a1b290 100644
(file)
--- a/
drivers/hwmon/max16065.c
+++ b/
drivers/hwmon/max16065.c
@@
-124,7
+124,7
@@
static inline int MV_TO_LIMIT(int mv, int range)
static inline int ADC_TO_CURR(int adc, int gain)
{
- return adc * 1400000 /
gain * 255
;
+ return adc * 1400000 /
(gain * 255)
;
}
/*