Skip to content

Commit

Permalink
iio:adc:qcom-spmi-vadc: use div64_s64 instead of direct 64 bit division.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Cameron committed Jan 10, 2017
1 parent 292ccbd commit e30eca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/adc/qcom-spmi-vadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit e30eca0

Please sign in to comment.