summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorMatt Ranostay <mranostay@gmail.com>2016-05-26 19:55:06 -0700
committerJonathan Cameron <jic23@kernel.org>2016-05-29 19:45:54 +0100
commit09bc0ddaab6cab0fa95a67d5535ec772e2671193 (patch)
tree398c6449d0ec6541d760dce49362b480d1f1c661 /drivers/iio
parentd43a41152f8e9e4c0d19850884d1fada076dee10 (diff)
downloadlinux-09bc0ddaab6cab0fa95a67d5535ec772e2671193.tar.bz2
iio: humidity: hdc100x: fix IIO_TEMP channel reporting
IIO_TEMP channel was being incorrectly reported back as Celsius when it should have been milliCelsius. This is via an incorrect scale value being returned to userspace. Signed-off-by: Matt Ranostay <mranostay@gmail.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-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 59aa1cbdc2fd..30709838dcdc 100644
--- a/drivers/iio/humidity/hdc100x.c
+++ b/drivers/iio/humidity/hdc100x.c
@@ -211,7 +211,7 @@ static int hdc100x_read_raw(struct iio_dev *indio_dev,
return IIO_VAL_INT_PLUS_MICRO;
case IIO_CHAN_INFO_SCALE:
if (chan->type == IIO_TEMP) {
- *val = 165;
+ *val = 165000;
*val2 = 65536 >> 2;
return IIO_VAL_FRACTIONAL;
} else {