diff options
author | Nuno Sa <nuno.sa@analog.com> | 2024-07-26 10:23:08 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-08-03 11:13:43 +0200 |
commit | 2059ffb636191c15b07ded787aef457d69bf2947 (patch) | |
tree | b40850117cee9bad34b6617352bc2e6ff83d8b25 /drivers | |
parent | iio: adc: ti-adc12138: make use of iio_for_each_active_channel() (diff) | |
download | linux-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.c | 3 |
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) |