Skip to content

Commit b475c59

Browse files
itirdeajic23
authored andcommitted
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>
1 parent 95e7ff0 commit b475c59

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/gyro/bmg160_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ static irqreturn_t bmg160_trigger_handler(int irq, void *p)
781781
mutex_unlock(&data->mutex);
782782
goto err;
783783
}
784-
data->buffer[i++] = ret;
784+
data->buffer[i++] = val;
785785
}
786786
mutex_unlock(&data->mutex);
787787

0 commit comments

Comments
 (0)