summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorChris Lesiak <chris.lesiak@licor.com>2019-11-21 20:39:42 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-17 20:39:09 +0100
commitd1958757ac6fb4046d143ae9e905c3e6b0fe8b69 (patch)
tree1a5131e5eb0e7a089675f7cd055e3ebc256aee65 /drivers
parentf2643dec8fd5b6736f71b1cdc036982eefb04fe4 (diff)
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: Chris Lesiak <chris.lesiak@licor.com> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/humidity/hdc100x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c
index 7851bd90ef64..b470cb8132da 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -237,7 +237,7 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
*val2 = 65536;
return IIO_VAL_FRACTIONAL;
} else {
- *val = 100;
+ *val = 100000;
*val2 = 65536;
return IIO_VAL_FRACTIONAL;
}