]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
staging:iio:adis16260: Fix reading calibscale
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 17 Jul 2013 14:44:00 +0000 (15:44 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sat, 3 Aug 2013 17:41:19 +0000 (18:41 +0100)
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>
drivers/staging/iio/gyro/adis16260_core.c

index 620d63fd099bcb10089e9ebb1b3a7b86dc53c9ba..0b344921048b5d394450b96ad4932359e47dc551 100644 (file)
@@ -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;
        }