OSDN Git Service

iio: Require strict scan mask matching in hardware mode
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 29 May 2015 16:14:22 +0000 (18:14 +0200)
committerJonathan Cameron <jic23@kernel.org>
Mon, 1 Jun 2015 10:34:54 +0000 (11:34 +0100)
commit1e1ec2861e0d4307267096c3f74c17298c1cde98
treed95b7fdb9e7695a05043c119fd900f6fe8944ede
parent225d59adf1c899176cce0fc80e42b1d1c12f109f
iio: Require strict scan mask matching in hardware mode

In hardware mode we can not use the software demuxer, this means that the
selected scan mask needs to match one of the available scan masks exactly.

It also means that all attached buffers need to use the same scan mask.
Given that when operating in hardware mode there is typically only a single
buffer attached to the device this not an issue. Add a sanity check to make
sure that only a single buffer is attached in hardware mode nevertheless.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/industrialio-buffer.c