Skip to content

Commit

Permalink
staging: iio: impedance-analyzer: ad5933: make use of iio_get_masklen…
Browse files Browse the repository at this point in the history
…gth()

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>
Link: https://patch.msgid.link/20240726-dev-iio-masklength-private3-v1-22-82913fc0fb87@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  • Loading branch information
Nuno Sa authored and Jonathan Cameron committed Aug 3, 2024
1 parent 7f60037 commit a71cfa4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/staging/iio/impedance-analyzer/ad5933.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,8 @@ static int ad5933_ring_preenable(struct iio_dev *indio_dev)
struct ad5933_state *st = iio_priv(indio_dev);
int ret;

if (bitmap_empty(indio_dev->active_scan_mask, indio_dev->masklength))
if (bitmap_empty(indio_dev->active_scan_mask,
iio_get_masklength(indio_dev)))
return -EINVAL;

ret = ad5933_reset(st);
Expand Down Expand Up @@ -625,7 +626,7 @@ static void ad5933_work(struct work_struct *work)

if (status & AD5933_STAT_DATA_VALID) {
int scan_count = bitmap_weight(indio_dev->active_scan_mask,
indio_dev->masklength);
iio_get_masklength(indio_dev));
ret = ad5933_i2c_read(st->client,
test_bit(1, indio_dev->active_scan_mask) ?
AD5933_REG_REAL_DATA : AD5933_REG_IMAG_DATA,
Expand Down

0 comments on commit a71cfa4

Please sign in to comment.