From: Hartmut Knaack Date: Fri, 19 Dec 2014 22:59:25 +0000 (+0100) Subject: iio:pressure:bmp280: cleanup X-Git-Tag: omap-for-v4.1/prcm-dts-mfd-syscon-fix~83^2~245^2~35 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44cf3798a3de3ebd8e5abe6c7fd5ee5c09b049de;p=pandora-kernel.git 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 Reviewed-by: Vlad Dogaru Signed-off-by: Jonathan Cameron --- Reading git-diff-tree failed