mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
iio: gyro: bmg160: fix buffer read values
commit b475c59b11 upstream.
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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
82bd14ade9
commit
5a103e7d6b
@@ -780,7 +780,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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user