summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNuno Sa <nuno.sa@analog.com>2024-07-26 10:23:08 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-08-03 11:13:43 +0200
commit2059ffb636191c15b07ded787aef457d69bf2947 (patch)
treeb40850117cee9bad34b6617352bc2e6ff83d8b25 /drivers
parentiio: adc: ti-adc12138: make use of iio_for_each_active_channel() (diff)
downloadlinux-2059ffb636191c15b07ded787aef457d69bf2947.tar.xz
linux-2059ffb636191c15b07ded787aef457d69bf2947.zip
iio: adc: ti-ads124s08: 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-16-82913fc0fb87@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/adc/ti-ads124s08.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/adc/ti-ads124s08.c b/drivers/iio/adc/ti-ads124s08.c
index 4ca62121f0d1..c115f892232a 100644
--- a/drivers/iio/adc/ti-ads124s08.c
+++ b/drivers/iio/adc/ti-ads124s08.c
@@ -279,8 +279,7 @@ static irqreturn_t ads124s_trigger_handler(int irq, void *p)
int scan_index, j = 0;
int ret;
- for_each_set_bit(scan_index, indio_dev->active_scan_mask,
- indio_dev->masklength) {
+ iio_for_each_active_channel(indio_dev, scan_index) {
ret = ads124s_write_reg(indio_dev, ADS124S08_INPUT_MUX,
scan_index);
if (ret)