From f15304143e4aa3ddd23a96bc0d119a83a566cc0f Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Wed, 17 Jul 2013 15:44:00 +0100 Subject: [PATCH] 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 Signed-off-by: Jonathan Cameron --- drivers/staging/iio/gyro/adis16260_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/iio/gyro/adis16260_core.c b/drivers/staging/iio/gyro/adis16260_core.c index 620d63fd099b..0b344921048b 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; } -- 2.20.1