mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-15 10:00:40 +09:00
staging:iio:ade7758: Fix check if channels are enabled in prenable
commit79fa64eb2eupstream. 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> Signed-off-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
035bc79c51
commit
4fdbedf556
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user