diff options
author | Paul Cercueil <paul.cercueil@analog.com> | 2015-05-15 17:18:36 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-05-16 11:58:36 +0200 |
commit | c2a8b623a089d52c199e305e7905829907db8ec8 (patch) | |
tree | 5c9cc6e73c81dd98a7aa6ba6b5b5d47babab3a09 /drivers/iio/imu/adis16400.h | |
parent | iio: adis16400: Use != channel indices for the two voltage channels (diff) | |
download | linux-c2a8b623a089d52c199e305e7905829907db8ec8.tar.xz linux-c2a8b623a089d52c199e305e7905829907db8ec8.zip |
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: 5eda3550a3cc ("staging:iio:adis16400: Preallocate transfer message")
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/imu/adis16400.h')
-rw-r--r-- | drivers/iio/imu/adis16400.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/imu/adis16400.h b/drivers/iio/imu/adis16400.h index 0916bf6b6c31..1e8fd2e81d45 100644 --- a/drivers/iio/imu/adis16400.h +++ b/drivers/iio/imu/adis16400.h @@ -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 |