summaryrefslogtreecommitdiff
path: root/drivers/iio/chemical/atlas-ph-sensor.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-02-08 10:51:59 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2019-02-08 10:51:59 -0800
commite464f50c057a1fbefae6c6078f9bd5511f84f199 (patch)
tree792126d89be7bcd9f8761f047c92788dd563c3f3 /drivers/iio/chemical/atlas-ph-sensor.c
parente22a15d1c4b36877934ab360aace41ddf8a6577c (diff)
parent6d923f8fe821c0c6b5378635cbcc9da5f5ec520a (diff)
downloadlwn-e464f50c057a1fbefae6c6078f9bd5511f84f199.tar.gz
lwn-e464f50c057a1fbefae6c6078f9bd5511f84f199.zip
Merge tag 'staging-5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging/IIO driver fixes from Greg KH: "Here are some small iio and staging driver fixes for 5.0-rc6. Nothing big, just resolve some reported IIO driver issues, and one staging driver bug. One staging driver patch was added and then reverted as well. All of these have been in linux-next for a while with no reported issues" * tag 'staging-5.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: Revert "staging: erofs: keep corrupted fs from crashing kernel in erofs_namei()" staging: erofs: keep corrupted fs from crashing kernel in erofs_namei() staging: octeon: fix broken phylib usage iio: ti-ads8688: Update buffer allocation for timestamps tools: iio: iio_generic_buffer: make num_loops signed iio: adc: axp288: Fix TS-pin handling iio: chemical: atlas-ph-sensor: correct IIO_TEMP values to millicelsius
Diffstat (limited to 'drivers/iio/chemical/atlas-ph-sensor.c')
-rw-r--r--drivers/iio/chemical/atlas-ph-sensor.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/iio/chemical/atlas-ph-sensor.c b/drivers/iio/chemical/atlas-ph-sensor.c
index a406ad31b096..3a20cb5d9bff 100644
--- a/drivers/iio/chemical/atlas-ph-sensor.c
+++ b/drivers/iio/chemical/atlas-ph-sensor.c
@@ -444,9 +444,8 @@ static int atlas_read_raw(struct iio_dev *indio_dev,
case IIO_CHAN_INFO_SCALE:
switch (chan->type) {
case IIO_TEMP:
- *val = 1; /* 0.01 */
- *val2 = 100;
- break;
+ *val = 10;
+ return IIO_VAL_INT;
case IIO_PH:
*val = 1; /* 0.001 */
*val2 = 1000;
@@ -477,7 +476,7 @@ static int atlas_write_raw(struct iio_dev *indio_dev,
int val, int val2, long mask)
{
struct atlas_data *data = iio_priv(indio_dev);
- __be32 reg = cpu_to_be32(val);
+ __be32 reg = cpu_to_be32(val / 10);
if (val2 != 0 || val < 0 || val > 20000)
return -EINVAL;