diff options
| author | Nuno Sa <[email protected]> | 2024-07-02 18:02:48 +0200 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2024-07-29 20:31:09 +0100 |
| commit | 972df0e9a08b62679ff8dcdd8cb650642804c38f (patch) | |
| tree | 29133f69b381cc54118f97720e69440913f1e51e | |
| parent | abcc9b8a9a42c948a22f0013c036de469f2d8f6e (diff) | |
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 <[email protected]>
Reviewed-by: Alexandru Ardelean <[email protected]>
Link: https://patch.msgid.link/20240702-dev-iio-masklength-private-v1-16-98193bf536a6@analog.com
Signed-off-by: Jonathan Cameron <[email protected]>
| -rw-r--r-- | drivers/iio/adc/ad799x.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/adc/ad799x.c b/drivers/iio/adc/ad799x.c index 0f0dcd9ca6b6..0f107e3fc2c8 100644 --- a/drivers/iio/adc/ad799x.c +++ b/drivers/iio/adc/ad799x.c @@ -237,7 +237,8 @@ static int ad799x_update_scan_mode(struct iio_dev *indio_dev, if (!st->rx_buf) 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) { case ad7992: |