]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
hwmon: (max16065) Fix current calculation
authorGuenter Roeck <guenter.roeck@ericsson.com>
Sun, 28 Aug 2011 20:01:49 +0000 (13:01 -0700)
committerGuenter Roeck <guenter.roeck@ericsson.com>
Mon, 29 Aug 2011 16:34:30 +0000 (09:34 -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

index d94a24fdf4ba2a07ad006ebeae536745d5e1a25d..dd2d7b9620c2bde5bb8cac1a2c8ac48879a1b290 100644 (file)
@@ -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);
 }
 
 /*