Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 299f9959 authored by Chris Lesiak's avatar Chris Lesiak Committed by Greg Kroah-Hartman
Browse files

iio: humidity: hdc100x: fix IIO_HUMIDITYRELATIVE channel reporting



commit 342a6928bd5017edbdae376042d8ad6af3d3b943 upstream.

The IIO_HUMIDITYRELATIVE channel was being incorrectly reported back
as percent when it should have been milli percent. This is via an
incorrect scale value being returned to userspace.

Signed-off-by: default avatarChris Lesiak <chris.lesiak@licor.com>
Acked-by: default avatarMatt Ranostay <matt.ranostay@konsulko.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a12dd9ed
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -229,7 +229,7 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
			*val2 = 65536;
			*val2 = 65536;
			return IIO_VAL_FRACTIONAL;
			return IIO_VAL_FRACTIONAL;
		} else {
		} else {
			*val = 100;
			*val = 100000;
			*val2 = 65536;
			*val2 = 65536;
			return IIO_VAL_FRACTIONAL;
			return IIO_VAL_FRACTIONAL;
		}
		}