diff options
author | Vlad Dogaru <vlad.dogaru@intel.com> | 2014-10-23 15:52:00 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-10-25 10:44:54 +0100 |
commit | 46ee98a206c1fa6fc394791fb6188a47820a80b5 (patch) | |
tree | 9dbf66954183afb20d3afedb6c8b3e4a460c1b24 /drivers/iio/pressure | |
parent | d5c94568cc1d11dffee349468ae996e420381453 (diff) |
bmp280: use correct routine for division
The proper way to divide two signed 64-bit values is to use div64_s64.
Signed-off-by: Vlad Dogaru <vlad.dogaru@intel.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/pressure')
-rw-r--r-- | drivers/iio/pressure/bmp280.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/pressure/bmp280.c b/drivers/iio/pressure/bmp280.c index fb91cb35b331..ce29ff91bce7 100644 --- a/drivers/iio/pressure/bmp280.c +++ b/drivers/iio/pressure/bmp280.c @@ -239,7 +239,7 @@ static u32 bmp280_compensate_press(struct bmp280_data *data, return 0; p = ((((s64) 1048576 - adc_press) << 31) - var2) * 3125; - do_div(p, var1); + p = div64_s64(p, var1); var1 = (((s64) comp->dig_p9) * (p >> 13) * (p >> 13)) >> 25; var2 = (((s64) comp->dig_p8) * p) >> 19; p = ((p + var1 + var2) >> 8) + (((s64) comp->dig_p7) << 4); |