]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iio: adis16400: Compute the scan mask from channel indices
authorPaul Cercueil <paul.cercueil@analog.com>
Fri, 15 May 2015 15:18:36 +0000 (17:18 +0200)
committerJiri Slaby <jslaby@suse.cz>
Tue, 23 Jun 2015 12:55:09 +0000 (14:55 +0200)
commit1de7778602373647965449c05df072c00eef90fa
treeeb3fdb213b3de9c58fd5fd1466146ae91a105b5a
parent1eb239e34765ab5e06035c78c1eb83e02224c8d3
iio: adis16400: Compute the scan mask from channel indices

commit c2a8b623a089d52c199e305e7905829907db8ec8 upstream.

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")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/iio/imu/adis16400.h
drivers/iio/imu/adis16400_core.c