diff options
author | Jonathan Cameron <jic23@kernel.org> | 2017-01-08 19:52:25 +0000 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-01-10 21:13:39 +0000 |
commit | e30eca0e69cb888125b081c96ca761e958fcb5b4 (patch) | |
tree | f05995f4dbcdf7d6691d0b86999c8e5ac1ce8c52 /drivers/iio | |
parent | 292ccbd3c419763f3b1bcd2816f53bd27d14be23 (diff) |
iio:adc:qcom-spmi-vadc: use div64_s64 instead of direct 64 bit division.
Another one of these that we missed previously which prevents test builds
of this driver on 32 bit platforms as it gives an undefined __divdi3 warning.
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/adc/qcom-spmi-vadc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/adc/qcom-spmi-vadc.c b/drivers/iio/adc/qcom-spmi-vadc.c index faaf711325b5..0a19761d656c 100644 --- a/drivers/iio/adc/qcom-spmi-vadc.c +++ b/drivers/iio/adc/qcom-spmi-vadc.c @@ -641,7 +641,7 @@ static int vadc_scale_therm(struct vadc_priv *vadc, vadc_scale_calib(vadc, adc_code, prop, &voltage); if (prop->calibration == VADC_CALIB_ABSOLUTE) - voltage /= 1000; + voltage = div64_s64(voltage, 1000); vadc_map_voltage_temp(adcmap_100k_104ef_104fb, ARRAY_SIZE(adcmap_100k_104ef_104fb), |