summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-06-10 15:00:00 +0100
committerJonathan Cameron <jic23@kernel.org>2013-06-11 20:31:00 +0100
commit19155762f189b3f3e46a9284752857989eb2c7e2 (patch)
treeb7ece99ac6ae5ac2e14d95e3a4c18dd9620fcc5f /drivers/staging
parentfe79112153e71f1b03a81294fe75199262d0f956 (diff)
staging:iio:adis16130: Fix sample reading
The driver first does a proper read of the data register, but right after that it does a spi_read, which will overwrite the initial result. It looks as if the extra spi_read was accidentally introduced in commit a5e7363ca ("staging:iio:gyro:adis16130 drop control of adc resolution."), quite likely due to a bad rebase. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/iio/gyro/adis16130_core.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/iio/gyro/adis16130_core.c b/drivers/staging/iio/gyro/adis16130_core.c
index 528863540796..2537f59f5425 100644
--- a/drivers/staging/iio/gyro/adis16130_core.c
+++ b/drivers/staging/iio/gyro/adis16130_core.c
@@ -62,7 +62,6 @@ static int adis16130_spi_read(struct iio_dev *indio_dev, u8 reg_addr, u32 *val)
spi_message_init(&msg);
spi_message_add_tail(&xfer, &msg);
ret = spi_sync(st->us, &msg);
- ret = spi_read(st->us, st->buf, 4);
if (ret == 0)
*val = (st->buf[1] << 16) | (st->buf[2] << 8) | st->buf[3];