diff options
author | Irina Tirdea <irina.tirdea@intel.com> | 2016-03-28 19:15:46 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2016-04-03 12:21:33 +0200 |
commit | b475c59b113db1e66eb9527ffdec3c5241c847e5 (patch) | |
tree | 126b82cd2d98ecd455c5ae07b88966c30af34080 | |
parent | iio: gyro: bmg160: fix endianness when reading axes (diff) | |
download | linux-b475c59b113db1e66eb9527ffdec3c5241c847e5.tar.xz linux-b475c59b113db1e66eb9527ffdec3c5241c847e5.zip |
iio: gyro: bmg160: fix buffer read values
When reading gyroscope axes using iio buffers, the values
returned are always 0. In the interrupt handler, the return
value of the read operation is returned to the user instead
of the value read. Return the value read to the user.
This is also fixed in commit 82d8e5da1a33 ("iio:
accel: bmg160: optimize transfers in trigger handler").
Signed-off-by: Irina Tirdea <irina.tirdea@intel.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/gyro/bmg160_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c index 8d3f0b36bc1c..4dac567e75b4 100644 --- a/drivers/iio/gyro/bmg160_core.c +++ b/drivers/iio/gyro/bmg160_core.c @@ -781,7 +781,7 @@ static irqreturn_t bmg160_trigger_handler(int irq, void *p) mutex_unlock(&data->mutex); goto err; } - data->buffer[i++] = ret; + data->buffer[i++] = val; } mutex_unlock(&data->mutex); |