Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cea5254f authored by Paul Cercueil's avatar Paul Cercueil Committed by Sasha Levin
Browse files

iio: adis16400: Compute the scan mask from channel indices



[ Upstream commit c2a8b623a089d52c199e305e7905829907db8ec8 ]

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: default avatarPaul Cercueil <paul.cercueil@analog.com>
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Fixes: 5eda3550 ("staging:iio:adis16400: Preallocate transfer message")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
parent 50e5b3c9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment