[PATCH 08/20] iio: accel: cros_ec_accel_legacy: make use of iio_get_masklength()

Nuno Sa via B4 Relay devnull+nuno.sa.analog.com at kernel.org
Tue Jul 2 09:02:40 PDT 2024


From: Nuno Sa <nuno.sa at analog.com>

Ue iio_get_masklength() to access '.masklength' so it can be annotated
as __private when there are no more direct users of it.

Signed-off-by: Nuno Sa <nuno.sa at analog.com>
---
 drivers/iio/accel/cros_ec_accel_legacy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/accel/cros_ec_accel_legacy.c b/drivers/iio/accel/cros_ec_accel_legacy.c
index 0f403342b1fc..f7e4dc02b34d 100644
--- a/drivers/iio/accel/cros_ec_accel_legacy.c
+++ b/drivers/iio/accel/cros_ec_accel_legacy.c
@@ -62,7 +62,7 @@ static int cros_ec_accel_legacy_read_cmd(struct iio_dev *indio_dev,
 		return ret;
 	}
 
-	for_each_set_bit(i, &scan_mask, indio_dev->masklength) {
+	for_each_set_bit(i, &scan_mask, iio_get_masklength(indio_dev)) {
 		*data = st->resp->dump.sensor[sensor_num].data[i] *
 			st->sign[i];
 		data++;

-- 
2.45.2





More information about the linux-arm-kernel mailing list