Re: [RESEND PATCH 00/14] IIO: Ensure iio_trigger_poll() is of the device owned trigger.

From: Waqar Hameed

Date: Fri Nov 13 2026 - 09:48:31 EST


On Mon, Nov 09, 2026 at 04:28 +0000 Jonathan Cameron <jic23@xxxxxxxxxx> wrote:

> From: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
>
> Resend due to wrong linux-iio email address. Sorry for the noise!
>
> LLM used to help pull this fairly straight forward series together.
>
> The primary aim here is to ensure a clean layering between the two sides
> of the trigger / pollfunc (push to buffers) divide. The caller of
> iio_trigger_poll() and iio_trigger_poll_nested() should be using data
> relevant to the trigger, not iio_dev->trig which is the
> current_trigger for the device. Most drivers got this layering right,
> but not this set!
>
> This is also step 1 in a plan to make iio_dev->trig opaque allowing
> more control of how it is assigned and avoiding traps around lifetimes.
>
> Includes one precursor fix that has been broken long enough I think
> we can just merge it via the slow path along with the rest of these.

I had the same comments as Joshua about packing the `struct`s (`pahole`
reports a lot of holes in `at91_adc_state` in patch 14, but that's
nothing new that was introduced in this patch series, and should
probably be addressed separately...). Other than that:

Reviewed-by: Waqar Hameed <waqar.hameed@xxxxxxxx>