aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-08-28 13:01:49 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-10-03 11:40:12 -0700
commita677ecd3c42c0324df53ef8e811907af2c17c218 (patch)
tree326af69b91f77e89eb16ec645d6cd6958b5d3a18 /drivers/hwmon
parent0b129e1ec4f63447c5467373909fa8e9d15826fd (diff)
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>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/max16065.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/max16065.c b/drivers/hwmon/max16065.c
index d94a24fdf4b..dd2d7b9620c 100644
--- a/drivers/hwmon/max16065.c
+++ b/drivers/hwmon/max16065.c
@@ -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);
}
/*