summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel/bma180.c
diff options
context:
space:
mode:
authorOctavian Purdila <octavian.purdila@intel.com>2015-03-02 20:03:05 +0100
committerJonathan Cameron <jic23@kernel.org>2015-03-07 20:17:07 +0100
commit70dddeee8945a0e62525a278ae7b91778f82f765 (patch)
treef286fe21ec087a95cf3c285604f3114a1aaa24af /drivers/iio/accel/bma180.c
parentstaging: comedi: adv_pci1710: fix AI INSN_READ for non-zero channel (diff)
downloadlinux-70dddeee8945a0e62525a278ae7b91778f82f765.tar.xz
linux-70dddeee8945a0e62525a278ae7b91778f82f765.zip
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/accel/bma180.c')
-rw-r--r--drivers/iio/accel/bma180.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index 1096da327130..75c6d2103e07 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -659,7 +659,7 @@ static irqreturn_t bma180_trigger_handler(int irq, void *p)
mutex_lock(&data->mutex);
- for_each_set_bit(bit, indio_dev->buffer->scan_mask,
+ for_each_set_bit(bit, indio_dev->active_scan_mask,
indio_dev->masklength) {
ret = bma180_get_data_reg(data, bit);
if (ret < 0) {