summaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/max16065.c
diff options
context:
space:
mode:
authorGuenter Roeck <guenter.roeck@ericsson.com>2011-08-28 13:01:49 -0700
committerGuenter Roeck <guenter.roeck@ericsson.com>2011-09-06 08:56:06 -0700
commitff71c182f461da5ae9d2d65f8a63f5a9193b9be1 (patch)
treea86470b74ba27ce176f81a8e94859b0d8d27aabb /drivers/hwmon/max16065.c
parentddf28352b80c86754a6424e3a61e8bdf9213b3c7 (diff)
downloadlinux-ff71c182f461da5ae9d2d65f8a63f5a9193b9be1.tar.bz2
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+
Diffstat (limited to 'drivers/hwmon/max16065.c')
-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 d94a24fdf4ba..dd2d7b9620c2 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);
}
/*