Re: [PATCH] iio: proximity: sx9360: use an int array for the sampling frequency range
From: Jonathan Cameron
Date: Sat Nov 07 2026 - 15:40:53 EST
On Wed, 4 Nov 2026 23:56:31 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Wed, Nov 04, 2026 at 11:26:04PM +0530, Arnav Kapoor wrote:
> > sx9360_samp_freq_interval[] is an array of struct { int val; int val2; }
> > that read_avail() hands to the IIO core by casting it to int *. That
> > relies on the struct having no padding. Declare it as an array of
> > int[2], like other IIO drivers do for their available ranges, so the
> > layout is plain and the cast no longer drops const.
> >
> > No functional change.
>
> LGTM,
>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>
Looks fine but will have to wait for the fix that touched this
code to make it to upstream for non fixes.