diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-04 18:03:15 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-14 08:47:58 -0800 |
commit | 4fdbedf5569be1dbd53cb6d87743e155b1eb032a (patch) | |
tree | d2c211a5b32cf1fd400d6e7778d0c5b38f85431a /drivers | |
parent | 035bc79c51a0c5cfca17f1692f9ad9de0d3ae829 (diff) | |
download | lwn-4fdbedf5569be1dbd53cb6d87743e155b1eb032a.tar.gz lwn-4fdbedf5569be1dbd53cb6d87743e155b1eb032a.zip |
staging:iio:ade7758: Fix check if channels are enabled in prenable
commit 79fa64eb2ee8ccb4bcad7f54caa2699730b10b22 upstream.
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>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.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 25e1b45b6c40..6a0ef97e9146 100644 --- a/drivers/staging/iio/meter/ade7758_ring.c +++ b/drivers/staging/iio/meter/ade7758_ring.c @@ -92,7 +92,7 @@ static int ade7758_ring_preenable(struct iio_dev *indio_dev) unsigned channel; int ret; - if (!bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength)) + if (bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength)) return -EINVAL; ret = iio_sw_buffer_preenable(indio_dev); |