aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iio/imu/adis16400.h
diff options
context:
space:
mode:
authorPaul Cercueil <paul.cercueil@analog.com>2015-05-15 11:18:36 -0400
committerJonathan Cameron <jic23@kernel.org>2015-05-16 05:58:36 -0400
commitc2a8b623a089d52c199e305e7905829907db8ec8 (patch)
tree5c9cc6e73c81dd98a7aa6ba6b5b5d47babab3a09 /drivers/iio/imu/adis16400.h
parent7323d59862802ca109451eeda9777024a7625509 (diff)
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.h1
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 {
165 int filt_int; 165 int filt_int;
166 166
167 struct adis adis; 167 struct adis adis;
168 unsigned long avail_scan_mask[2];
168}; 169};
169 170
170/* At the moment triggers are only used for ring buffer 171/* At the moment triggers are only used for ring buffer