aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Sa <nuno.sa@analog.com>2024-07-02 18:02:46 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-07-29 20:31:08 +0100
commit3dface1fb59b4272d96ce558c726f296a00ebf8c (patch)
treef2d880f70649868e65d82701d5349f46f102763f
parentd637a64db3b29fde1daca0c1f4882674d13fae28 (diff)
iio: adc: ad7266: make use of iio_get_masklength()
Use 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-14-98193bf536a6@analog.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/adc/ad7266.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/adc/ad7266.c b/drivers/iio/adc/ad7266.c
index bdac020045b4..88f39533f249 100644
--- a/drivers/iio/adc/ad7266.c
+++ b/drivers/iio/adc/ad7266.c
@@ -123,7 +123,8 @@ static int ad7266_update_scan_mode(struct iio_dev *indio_dev,
const unsigned long *scan_mask)
{
struct ad7266_state *st = iio_priv(indio_dev);
- unsigned int nr = find_first_bit(scan_mask, indio_dev->masklength);
+ unsigned int nr = find_first_bit(scan_mask,
+ iio_get_masklength(indio_dev));
ad7266_select_input(st, nr);