iio: buffer: Fix demux table creation
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 17 Jul 2014 15:59:00 +0000 (16:59 +0100)
committerJonathan Cameron <jic23@kernel.org>
Sun, 20 Jul 2014 14:44:39 +0000 (15:44 +0100)
commit61bd55ce1667809f022be88da77db17add90ea4e
tree0db136bcbab11800597b97286f5301a6abcc235d
parent71702e6e52c8312f4c6797a9787d0f8b5656156f
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
drivers/iio/industrialio-buffer.c