Re: [PATCH] iio: proximity: sx9360: use an int array for the sampling frequency range
From: Andy Shevchenko
Date: Wed Nov 04 2026 - 17:42:38 EST
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>
--
With Best Regards,
Andy Shevchenko