Skip to content

Commit ff71c18

Browse files
author
Guenter Roeck
committed
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+
1 parent ddf2835 commit ff71c18

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/hwmon/max16065.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ static inline int MV_TO_LIMIT(int mv, int range)
124124

125125
static inline int ADC_TO_CURR(int adc, int gain)
126126
{
127-
return adc * 1400000 / gain * 255;
127+
return adc * 1400000 / (gain * 255);
128128
}
129129

130130
/*

0 commit comments

Comments
 (0)