iio: adc: ad7606_spi: use bitmap_full() in ad7606_spi_update_scan_mode()

bitmap_full() is less verbose and more efficient, as it stops traversing
scan_mask as soon as the 1st unset bit found.

Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
Reviewed-by: David Lechner <dlechner@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Yury Norov (NVIDIA)
2025-12-15 19:18:06 -05:00
committed by Jonathan Cameron
parent eec44b04eb
commit 4e44c635ba

View File

@@ -345,7 +345,7 @@ static int ad7606_spi_update_scan_mode(struct iio_dev *indio_dev,
* has no way of demuxing the data to filter out unwanted
* channels.
*/
if (bitmap_weight(scan_mask, num_adc_ch) != num_adc_ch)
if (!bitmap_full(scan_mask, num_adc_ch))
return -EINVAL;
}