diff options
author | Hartmut Knaack <knaack.h@gmx.de> | 2014-12-19 23:59:25 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-12-26 10:32:34 +0000 |
commit | 44cf3798a3de3ebd8e5abe6c7fd5ee5c09b049de (patch) | |
tree | 08c61eea273c85003814be6f7d6afd3c2f39cab7 /Documentation/ABI | |
parent | 762c4da347109398bbcc7783b7ce2496664442ed (diff) | |
download | linux-44cf3798a3de3ebd8e5abe6c7fd5ee5c09b049de.tar.gz linux-44cf3798a3de3ebd8e5abe6c7fd5ee5c09b049de.tar.bz2 linux-44cf3798a3de3ebd8e5abe6c7fd5ee5c09b049de.zip |
iio:pressure:bmp280: cleanup
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>
Diffstat (limited to 'Documentation/ABI')
0 files changed, 0 insertions, 0 deletions