Re: [PATCH v2 1/4] iio: backend: update iio_backend_oversampling_ratio_set
From: David Lechner
Date: Thu May 08 2025 - 12:42:14 EST
On 5/8/25 7:30 AM, Pop Ioan Daniel wrote:
> In the function iio_backend_oversampling_ratio_set the chan parameter
> was added. The function can be used in contexts where the channel
> must be specified. All affected files have been modified.
>
> Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@xxxxxxxxxx>
> ---
> changes in v2:
> - remove iio_backend_set_dec_rate function and use
> iio_backend_oversampling_ratio_set function
> drivers/iio/adc/ad4851.c | 2 +-
> drivers/iio/adc/adi-axi-adc.c | 3 ++-
> drivers/iio/industrialio-backend.c | 3 ++-
> include/linux/iio/backend.h | 3 ++-
> 4 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/iio/adc/ad4851.c b/drivers/iio/adc/ad4851.c
> index 98ebc853db79..a943d5aac9e5 100644
> --- a/drivers/iio/adc/ad4851.c
> +++ b/drivers/iio/adc/ad4851.c
> @@ -321,7 +321,7 @@ static int ad4851_set_oversampling_ratio(struct iio_dev *indio_dev,
> return ret;
> }
>
> - ret = iio_backend_oversampling_ratio_set(st->back, osr);
> + ret = iio_backend_oversampling_ratio_set(st->back, chan, osr);
Isn't this a compile error? chan here is const struct iio_chan_spec *, not
unsigned int.
> if (ret)
> return ret;
>