Skip to content

Commit 79fa64e

Browse files
larsclausenjic23
authored andcommitted
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: 550268c ("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>
1 parent e105547 commit 79fa64e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/staging/iio/meter/ade7758_ring.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static int ade7758_ring_preenable(struct iio_dev *indio_dev)
8787
{
8888
unsigned channel;
8989

90-
if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
90+
if (bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
9191
return -EINVAL;
9292

9393
channel = find_first_bit(indio_dev->active_scan_mask,

0 commit comments

Comments
 (0)