提交 79fa64eb 编写于 作者: L Lars-Peter Clausen 提交者: Jonathan Cameron

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: 550268ca ("staging:iio: scrap scan_count and ensure all drivers use active_scan_mask")
Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 e1055473
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册