aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/ina2xx.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2018-12-21 09:57:42 +0000
committerMark Brown <broonie@kernel.org>2018-12-21 09:57:42 +0000
commit4ab452c56f5c65636fbf1cf0a7b43cd5c05889b6 (patch)
tree24cb63796feaf1fe4d2bd8a6c2298c5974fdde62 /drivers/hwmon/ina2xx.c
parent43603a35574c2e594f9e10a97a40874d1282dd7e (diff)
parente95d10da90f48177a1ffd3fef90c9997977cfc24 (diff)
downloadlinux-linaro-stable-linux-linaro-lsk-v4.9-rt.tar.gz
Merge branch 'linux-linaro-lsk-v4.9' into linux-linaro-lsk-v4.9-rtlinux-linaro-lsk-v4.9-rt
Diffstat (limited to 'drivers/hwmon/ina2xx.c')
-rw-r--r--drivers/hwmon/ina2xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/ina2xx.c b/drivers/hwmon/ina2xx.c
index 9ac6e1673375..1f291b344178 100644
--- a/drivers/hwmon/ina2xx.c
+++ b/drivers/hwmon/ina2xx.c
@@ -273,7 +273,7 @@ static int ina2xx_get_value(struct ina2xx_data *data, u8 reg,
break;
case INA2XX_CURRENT:
/* signed register, result in mA */
- val = regval * data->current_lsb_uA;
+ val = (s16)regval * data->current_lsb_uA;
val = DIV_ROUND_CLOSEST(val, 1000);
break;
case INA2XX_CALIBRATION: