iio: adis16400: Compute the scan mask from channel indices
We unfortunately can't use ~0UL for the scan mask to indicate that the
only valid scan mask is all channels selected. The IIO core needs the exact
mask to work correctly and not a super-set of it. So calculate the masked
based on the channels that are available for a particular device.
Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Fixes: 5eda3550a3
("staging:iio:adis16400: Preallocate transfer message")
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:

committed by
Jonathan Cameron

parent
7323d59862
commit
c2a8b623a0
@@ -165,6 +165,7 @@ struct adis16400_state {
|
||||
int filt_int;
|
||||
|
||||
struct adis adis;
|
||||
unsigned long avail_scan_mask[2];
|
||||
};
|
||||
|
||||
/* At the moment triggers are only used for ring buffer
|
||||
|
Reference in New Issue
Block a user