提交 e30eca0e 编写于 作者: J Jonathan Cameron

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: NJonathan Cameron <jic23@kernel.org>
上级 292ccbd3
...@@ -641,7 +641,7 @@ static int vadc_scale_therm(struct vadc_priv *vadc, ...@@ -641,7 +641,7 @@ static int vadc_scale_therm(struct vadc_priv *vadc,
vadc_scale_calib(vadc, adc_code, prop, &voltage); vadc_scale_calib(vadc, adc_code, prop, &voltage);
if (prop->calibration == VADC_CALIB_ABSOLUTE) if (prop->calibration == VADC_CALIB_ABSOLUTE)
voltage /= 1000; voltage = div64_s64(voltage, 1000);
vadc_map_voltage_temp(adcmap_100k_104ef_104fb, vadc_map_voltage_temp(adcmap_100k_104ef_104fb,
ARRAY_SIZE(adcmap_100k_104ef_104fb), ARRAY_SIZE(adcmap_100k_104ef_104fb),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册