Re: [PATCH 1/4] iio: buffer: Fix demux table creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17/07/14 16:59, Lars-Peter Clausen wrote:
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@xxxxxxxxxx>
Ouch.  Applied to the fixes-togreg branch of iio.git and marked
for stable.

How we managed to fail to see the effects of this is beyond me.
I guess the fact that the timestamp is handled separately made
it quite a bit less obvious than it otherwise would have been.

Thanks,

Jonathan
---
  drivers/iio/industrialio-buffer.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 2952ee0..0472ee2 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -963,7 +963,7 @@ static int iio_buffer_update_demux(struct iio_dev *indio_dev,

  	/* Now we have the two masks, work from least sig and build up sizes */
  	for_each_set_bit(out_ind,
-			 indio_dev->active_scan_mask,
+			 buffer->scan_mask,
  			 indio_dev->masklength) {
  		in_ind = find_next_bit(indio_dev->active_scan_mask,
  				       indio_dev->masklength,


--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux