diff mbox series

[RFC,2/3] iio: imu: adis16475: make use of iio_for_each_active_channel()

Message ID 20240612-dev-iio-scan-private-v1-2-7c75c8e3d30b@analog.com (mailing list archive)
State Changes Requested
Headers show
Series iio: add helpers and accessors for active channels and masklength | expand

Commit Message

Nuno Sá June 12, 2024, 2:20 p.m. UTC
Use the new IIO accessor for iterating over the active channels.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
---
 drivers/iio/imu/adis16475.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/iio/imu/adis16475.c b/drivers/iio/imu/adis16475.c
index cf73c6f46c79..1cc2a66a78ff 100644
--- a/drivers/iio/imu/adis16475.c
+++ b/drivers/iio/imu/adis16475.c
@@ -1608,8 +1608,7 @@  static int adis16475_push_single_sample(struct iio_poll_func *pf)
 		return -EINVAL;
 	}
 
-	for_each_set_bit(bit, indio_dev->active_scan_mask,
-			 indio_dev->masklength) {
+	iio_for_each_active_channel(indio_dev, bit) {
 		/*
 		 * When burst mode is used, system flags is the first data
 		 * channel in the sequence, but the scan index is 7.