hwmon: (max16065) Fix current calculation
commit ff71c182f461da5ae9d2d65f8a63f5a9193b9be1 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0b129e1ec4
commit
a677ecd3c4
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user