[RESEND PATCH 03/14] iio: adc: max1027: poll own trigger from interrupt handler

From: Jonathan Cameron

Date: Sun Nov 08 2026 - 23:32:12 EST


From: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>

Poll st->trig from max1027_handler() rather than indio_dev->trig. The
poll is only reached when the buffer is enabled and the device's own
trigger is in use.

This removes a dependency on the trig field of struct iio_dev, which
is to become private to the IIO core.

Signed-off-by: Jonathan Cameron <jonathan.cameron@xxxxxxxxxxxxxxxx>
---
drivers/iio/adc/max1027.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c
index 8d282feea8b5..65a0e85faca9 100644
--- a/drivers/iio/adc/max1027.c
+++ b/drivers/iio/adc/max1027.c
@@ -481,7 +481,7 @@ static irqreturn_t max1027_handler(int irq, void *private)
if (!iio_buffer_enabled(indio_dev) || !iio_trigger_using_own(indio_dev))
complete(&st->complete);
else
- iio_trigger_poll(indio_dev->trig);
+ iio_trigger_poll(st->trig);

return IRQ_HANDLED;
}
--
2.56.0