iio: buffer: Fix demux table creation
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 17 Jul 2014 15:59:00 +0000 (16:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Aug 2014 23:53:52 +0000 (16:53 -0700)
commit49ab5de52b88d5e3a06c55aa07594e798c6eb9cc
tree1c19aaddbe11f81d4678210c3baf15b386f2bf22
parente66a33cf4c92ec182a240d64789abeb968871de4
iio: buffer: Fix demux table creation

commit 61bd55ce1667809f022be88da77db17add90ea4e upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iio/industrialio-buffer.c