summaryrefslogtreecommitdiffstats
path: root/drivers/iio/accel
diff options
context:
space:
mode:
authorNuno Sa <nuno.sa@analog.com>2024-07-02 18:02:40 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-07-29 21:31:08 +0200
commitbac3b7c43d6d9ed6749b9dc9f56a8c0e0e73cb02 (patch)
tree67b110c70e0b61405039a186b4293d23218a0ec1 /drivers/iio/accel
parentiio: accel: bmc150-accel-core: make use of iio_for_each_active_channel() (diff)
downloadlinux-bac3b7c43d6d9ed6749b9dc9f56a8c0e0e73cb02.tar.xz
linux-bac3b7c43d6d9ed6749b9dc9f56a8c0e0e73cb02.zip
iio: accel: cros_ec_accel_legacy: make use of iio_get_masklength()
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@analog.com> Reviewed-by: Alexandru Ardelean <aardelean@baylibre.com> Link: https://patch.msgid.link/20240702-dev-iio-masklength-private-v1-8-98193bf536a6@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel')
-rw-r--r--drivers/iio/accel/cros_ec_accel_legacy.c2
1 files changed, 1 insertions, 1 deletions
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++;