aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Sa <nuno.sa@analog.com>2024-07-26 10:22:55 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-08-03 10:13:42 +0100
commitac9641f4787f04f846337f21cffe609ebae11330 (patch)
treefa67154c308379628b6725ee173c3a6052be489d
parentd61a4b3529bb9ad9d9ea2ea36bb14240bef1039d (diff)
iio: adc: max1118: make use of iio_for_each_active_channel()
Use iio_for_each_active_channel() to iterate over active channels accessing '.masklength' so it can be annotated as __private when there are no more direct users of it. Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-3-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/adc/max1118.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/adc/max1118.c b/drivers/iio/adc/max1118.c
index 75ab57d9aef7..0beccfde81f2 100644
--- a/drivers/iio/adc/max1118.c
+++ b/drivers/iio/adc/max1118.c
@@ -174,8 +174,7 @@ static irqreturn_t max1118_trigger_handler(int irq, void *p)
mutex_lock(&adc->lock);
- for_each_set_bit(scan_index, indio_dev->active_scan_mask,
- indio_dev->masklength) {
+ iio_for_each_active_channel(indio_dev, scan_index) {
const struct iio_chan_spec *scan_chan =
&indio_dev->channels[scan_index];
int ret = max1118_read(indio_dev, scan_chan->channel);