diff options
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/chemical/bme680_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/chemical/bme680_core.c b/drivers/iio/chemical/bme680_core.c index 6ea99e4cbf92..bf23cc7eb99e 100644 --- a/drivers/iio/chemical/bme680_core.c +++ b/drivers/iio/chemical/bme680_core.c @@ -479,7 +479,7 @@ static u8 bme680_calc_heater_res(struct bme680_data *data, u16 temp) var4 = (var3 / (calib->res_heat_range + 4)); var5 = 131 * calib->res_heat_val + 65536; heatr_res_x100 = ((var4 / var5) - 250) * 34; - heatr_res = (heatr_res_x100 + 50) / 100; + heatr_res = DIV_ROUND_CLOSEST(heatr_res_x100, 100); return heatr_res; } |