On Sat, Apr 25, 2026 at 08:39:20PM +0000, Antony Kurniawan Soemardi wrote:
> These functions do not modify the indio_dev & adc structure, so they
> should be marked const to allow the compiler to catch any accidental
> modifications and to document the read only nature of these functions.

...

> -     struct pm8xxx_xoadc *adc = iio_priv(indio_dev);
> +     const struct iio_dev *indio_dev = d;
> +     const struct pm8xxx_xoadc *adc = iio_priv(indio_dev);
>  
>       complete(&adc->complete);

Pointer to a constant object assumes no modification to that, isn't it? Please,
compile your code first.


-- 
With Best Regards,
Andy Shevchenko



Reply via email to