IIO: bmp280-core.c: fix error in humidity calculation
commited3730c435f1a9f9559ed7762035d22d8a95adfe
authorAndreas Klinger <ak@it-klinger.de>
Mon, 10 Apr 2017 17:00:01 +0000 (10 19:00 +0200)
committerJonathan Cameron <jic23@kernel.org>
Fri, 14 Apr 2017 15:54:49 +0000 (14 16:54 +0100)
tree677e87223f1e19d556faec1d463da4d1af834f29
parent84ca8e364acb26aba3292bc113ca8ed4335380fd
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