diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-04 18:03:15 +0100 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-11-05 18:33:47 +0000 |
commit | 79fa64eb2ee8ccb4bcad7f54caa2699730b10b22 (patch) | |
tree | 4d8d51a9e988ffc01ba1156928d15d05ab9c8458 /drivers | |
parent | e10554738cab4224e097c2f9d975ea781a4fcde4 (diff) |
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: 550268ca1111 ("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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/iio/meter/ade7758_ring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/meter/ade7758_ring.c b/drivers/staging/iio/meter/ade7758_ring.c index 628e902dd815..6e9006490742 100644 --- a/drivers/staging/iio/meter/ade7758_ring.c +++ b/drivers/staging/iio/meter/ade7758_ring.c @@ -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, |