Browse Source

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>
Lars-Peter Clausen 12 years ago
parent
commit
f15304143e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/iio/gyro/adis16260_core.c

+ 1 - 1
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;
 	}