hwmon: (max16065) Fix current calculation
authorGuenter Roeck <[email protected]>
Sun, 28 Aug 2011 20:01:49 +0000 (13:01 -0700)
committerGuenter Roeck <[email protected]>
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 <[email protected]>
Acked-by: Jean Delvare <[email protected]>
Cc: [email protected] # 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);
 }
 
 /*