1

iio: adc: ad799x: 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-16-98193bf536a6@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Nuno Sa 2024-07-02 18:02:48 +02:00 committed by Jonathan Cameron
parent abcc9b8a9a
commit 972df0e9a0

View File

@ -237,7 +237,8 @@ static int ad799x_update_scan_mode(struct iio_dev *indio_dev,
if (!st->rx_buf) if (!st->rx_buf)
return -ENOMEM; return -ENOMEM;
st->transfer_size = bitmap_weight(scan_mask, indio_dev->masklength) * 2; st->transfer_size = bitmap_weight(scan_mask,
iio_get_masklength(indio_dev)) * 2;
switch (st->id) { switch (st->id) {
case ad7992: case ad7992: