Commit a677ecd3 authored by Guenter Roeck's avatar Guenter Roeck Committed by Greg Kroah-Hartman

hwmon: (max16065) Fix current calculation

commit ff71c182 upstream.

Current calculation is completely wrong. Add missing brackets to fix it.
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
Acked-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0b129e1e
......@@ -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);
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment