]> git.baikalelectronics.ru Git - kernel.git/commit
IIO: bmp280-core.c: fix error in humidity calculation
authorAndreas Klinger <ak@it-klinger.de>
Mon, 10 Apr 2017 17:00:01 +0000 (19:00 +0200)
committerJonathan Cameron <jic23@kernel.org>
Fri, 14 Apr 2017 15:54:49 +0000 (16:54 +0100)
commit7dcbd1e41bb1e8c3154e0cb79e2dc9b7640d1417
tree677e87223f1e19d556faec1d463da4d1af834f29
parent82ca5c136160acd25a7537596970bf9813d4f907
IIO: bmp280-core.c: fix error in humidity calculation

While calculating the compensation of the humidity there are negative values
interpreted as unsigned because of unsigned variables used.  These values as
well as the constants need to be casted to signed as indicated by the
documentation of the sensor.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/pressure/bmp280-core.c