mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
44cf3798a3
The calculations for temperature and pressure compensation were already slightly optimized in comparison to the datasheet. So, it makes sense to optimize even a bit more, making proper use of C operators: - variable t in bmp280_compensate_temp() can be eliminated by directly returning the result of the relevant equation. - make use of the += operator and eliminate an unnecessary parenthesis level in bmp280_compensate_press(). When the initialization of the ctrl_meas register fails, the error message will now mention the right register name. During probe, i2c_set_clientdata() is called, although it is not necessary. Drop it. Signed-off-by: Hartmut Knaack <knaack.h@gmx.de> Reviewed-by: Vlad Dogaru <vlad.dogaru@intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org> |
||
---|---|---|
.. | ||
bmp280.c | ||
hid-sensor-press.c | ||
Kconfig | ||
Makefile | ||
mpl115.c | ||
mpl3115.c | ||
st_pressure.h | ||
st_pressure_buffer.c | ||
st_pressure_core.c | ||
st_pressure_i2c.c | ||
st_pressure_spi.c | ||
t5403.c |