]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: hudmidity: hdc100x: fix incorrect shifting and scaling
authorMatt Ranostay <mranostay@gmail.com>
Mon, 30 May 2016 02:52:02 +0000 (19:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Jul 2016 15:42:21 +0000 (08:42 -0700)
commita9a8bcdace6e3665287ff4bd9e95d99877c14c7c
tree5e928b9a97eeb831d35f9f5cd9e6a4d9f129c663
parentf5b3e8171c6249142308542007111a4a559772a8
iio: hudmidity: hdc100x: fix incorrect shifting and scaling

commit 94bef000f1d4aa111f4ddda1482cf3b30ad069ce upstream.

Shifting sensor data to the right 2 bits was incorrect and caused the
scaling values + offsets to be invalid.

Reported-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Tested-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/humidity/hdc100x.c