diff options
author | Octavian Purdila <octavian.purdila@intel.com> | 2015-03-02 14:03:05 -0500 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-03-07 14:17:07 -0500 |
commit | 70dddeee8945a0e62525a278ae7b91778f82f765 (patch) | |
tree | f286fe21ec087a95cf3c285604f3114a1aaa24af /drivers/iio/gyro | |
parent | abe46b8932dd9a6dfc3698e3eb121809b7b9ed28 (diff) |
iio: fix drivers that check buffer->scan_mask
If the in-kernel push interface is used we may have a different masks
on the device buffer and the kernel buffer and in this case the device
should generate data for the reunion of the buffers, which is
available at indio_dev->active_scan_mask.
Compiled tested only except for bmc150-accel which was tested at
runtime with the hardware.
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/gyro')
-rw-r--r-- | drivers/iio/gyro/bmg160.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/gyro/bmg160.c b/drivers/iio/gyro/bmg160.c index 60451b328242..ccf3ea7e1afa 100644 --- a/drivers/iio/gyro/bmg160.c +++ b/drivers/iio/gyro/bmg160.c | |||
@@ -822,7 +822,7 @@ static irqreturn_t bmg160_trigger_handler(int irq, void *p) | |||
822 | int bit, ret, i = 0; | 822 | int bit, ret, i = 0; |
823 | 823 | ||
824 | mutex_lock(&data->mutex); | 824 | mutex_lock(&data->mutex); |
825 | for_each_set_bit(bit, indio_dev->buffer->scan_mask, | 825 | for_each_set_bit(bit, indio_dev->active_scan_mask, |
826 | indio_dev->masklength) { | 826 | indio_dev->masklength) { |
827 | ret = i2c_smbus_read_word_data(data->client, | 827 | ret = i2c_smbus_read_word_data(data->client, |
828 | BMG160_AXIS_TO_REG(bit)); | 828 | BMG160_AXIS_TO_REG(bit)); |