projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
292ccbd
)
iio:adc:qcom-spmi-vadc: use div64_s64 instead of direct 64 bit division.
author
Jonathan Cameron
<jic23@kernel.org>
Sun, 8 Jan 2017 19:52:25 +0000
(19:52 +0000)
committer
Jonathan Cameron
<jic23@kernel.org>
Tue, 10 Jan 2017 21:13:39 +0000
(21:13 +0000)
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>
drivers/iio/adc/qcom-spmi-vadc.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iio/adc/qcom-spmi-vadc.c
b/drivers/iio/adc/qcom-spmi-vadc.c
index faaf711325b524269a716822772858e5a31b8165..0a19761d656c66ab8ae87d871556f1f4f13f4884 100644
(file)
--- 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),