summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-07-17 15:44:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-08-03 18:41:19 +0100
commitf15304143e4aa3ddd23a96bc0d119a83a566cc0f (patch)
tree196ba581159cf1dd038e40cca435bc2c08b9d64b
parentd9a0134e7aa048f3de4477d93598974ea8ecae7a (diff)
staging:iio:adis16260: Fix reading calibscale
Return the actual value read from the device and not just the mask. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/staging/iio/gyro/adis16260_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c
index 620d63fd099..0b344921048 100644
--- a/drivers/staging/iio/gyro/adis16260_core.c
+++ b/drivers/staging/iio/gyro/adis16260_core.c
@@ -223,7 +223,7 @@ static int adis16260_read_raw(struct iio_dev *indio_dev,
mutex_unlock(&indio_dev->mlock);
return ret;
}
- *val = (1 << bits) - 1;
+ *val = val16;
mutex_unlock(&indio_dev->mlock);
return IIO_VAL_INT;
}