Commit adea30f0 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Zefan Li

staging:iio:ade7758: Fix check if channels are enabled in prenable

commit 79fa64eb upstream.

We should check if a channel is enabled, not if no channels are enabled.

Fixes: 550268ca ("staging:iio: scrap scan_count and ensure all drivers use active_scan_mask")
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
parent 7ef2f8d1
......@@ -96,7 +96,7 @@ static int ade7758_ring_preenable(struct iio_dev *indio_dev)
size_t d_size;
unsigned channel;
if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
if (bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
return -EINVAL;
channel = find_first_bit(indio_dev->active_scan_mask,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment