Skip to content

Commit

Permalink
iio: gyro: bmg160: fix buffer read values
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Irina Tirdea authored and Jonathan Cameron committed Apr 3, 2016
1 parent 95e7ff0 commit b475c59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iio/gyro/bmg160_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b475c59

Please sign in to comment.