summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Sa <nuno.sa@analog.com>2024-07-18 15:38:02 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-08-03 10:13:40 +0100
commitf8d6c31d4717a43cb63564eed5c6a7a07fa63f77 (patch)
tree693ba1fcd5b47d7fb88ad3a6273bb2019b24fa5c
parent72c399838b2e9fed9856ee9c52375f628310dab9 (diff)
downloadlwn-f8d6c31d4717a43cb63564eed5c6a7a07fa63f77.tar.gz
lwn-f8d6c31d4717a43cb63564eed5c6a7a07fa63f77.zip
iio: light: tcs3414: 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/20240718-dev-iio-masklength-private2-v1-16-8e12cd042906@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/light/tcs3414.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/light/tcs3414.c b/drivers/iio/light/tcs3414.c
index c9566615b964..4fecdf10aeb1 100644
--- a/drivers/iio/light/tcs3414.c
+++ b/drivers/iio/light/tcs3414.c
@@ -206,8 +206,7 @@ static irqreturn_t tcs3414_trigger_handler(int irq, void *p)
struct tcs3414_data *data = iio_priv(indio_dev);
int i, j = 0;
- for_each_set_bit(i, indio_dev->active_scan_mask,
- indio_dev->masklength) {
+ iio_for_each_active_channel(indio_dev, i) {
int ret = i2c_smbus_read_word_data(data->client,
TCS3414_DATA_GREEN + 2*i);
if (ret < 0)