Skip to content

Commit

Permalink
staging:iio:ade7758: Fix check if channels are enabled in prenable
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: <[email protected]>
Signed-off-by: Jonathan Cameron <[email protected]>
  • Loading branch information
larsclausen authored and jic23 committed Nov 5, 2014
1 parent e105547 commit 79fa64e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/meter/ade7758_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 79fa64e

Please sign in to comment.