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>
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

index d94a24f..dd2d7b9 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);
 }
 
 /*