1
0
Fork 0

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

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

Fixes: 550268ca11 ("staging:iio: scrap scan_count and ensure all drivers use active_scan_mask")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
hifive-unleashed-5.1
Lars-Peter Clausen 2014-11-04 18:03:15 +01:00 committed by Jonathan Cameron
parent e10554738c
commit 79fa64eb2e
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ static int ade7758_ring_preenable(struct iio_dev *indio_dev)
{
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,