Commit ff71c182f461da5ae9d2d65f8a63f5a9193b9be1

Authored by Guenter Roeck
1 parent ddf28352b8

hwmon: (max16065) Fix current calculation

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+

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

drivers/hwmon/max16065.c
... ... @@ -124,7 +124,7 @@
124 124  
125 125 static inline int ADC_TO_CURR(int adc, int gain)
126 126 {
127   - return adc * 1400000 / gain * 255;
  127 + return adc * 1400000 / (gain * 255);
128 128 }
129 129  
130 130 /*