aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/industrialio-buffer.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-07-17 11:59:00 -0400
committerJonathan Cameron <jic23@kernel.org>2014-07-20 10:44:39 -0400
commit61bd55ce1667809f022be88da77db17add90ea4e (patch)
tree0db136bcbab11800597b97286f5301a6abcc235d /drivers/iio/industrialio-buffer.c
parent71702e6e52c8312f4c6797a9787d0f8b5656156f (diff)
iio: buffer: Fix demux table creation
When creating the demux table we need to iterate over the selected scan mask for the buffer to get the samples which should be copied to destination buffer. Right now the code uses the mask which contains all active channels, which means the demux table contains entries which causes it to copy all the samples from source to destination buffer one by one without doing any demuxing. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Cc: Stable@vger.kernel.org
Diffstat (limited to 'drivers/iio/industrialio-buffer.c')
-rw-r--r--drivers/iio/industrialio-buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 36b1ae92e239..9f1a14009901 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -966,7 +966,7 @@ static int iio_buffer_update_demux(struct iio_dev *indio_dev,
966 966
967 /* Now we have the two masks, work from least sig and build up sizes */ 967 /* Now we have the two masks, work from least sig and build up sizes */
968 for_each_set_bit(out_ind, 968 for_each_set_bit(out_ind,
969 indio_dev->active_scan_mask, 969 buffer->scan_mask,
970 indio_dev->masklength) { 970 indio_dev->masklength) {
971 in_ind = find_next_bit(indio_dev->active_scan_mask, 971 in_ind = find_next_bit(indio_dev->active_scan_mask,
972 indio_dev->masklength, 972 indio_dev->masklength,