Re: [PATCH v2] iio: trigger: iio-trig-interrupt: use devm_* helpers

From: Andy Shevchenko

Date: Mon May 11 2026 - 11:20:44 EST


On Mon, May 11, 2026 at 11:32:29AM +0500, Stepan Ionichev wrote:
> Convert to devm_iio_trigger_alloc(), devm_request_irq() and
> devm_iio_trigger_register(). The driver-managed lifecycle removes
> the manual error-cleanup ladder in probe and the entire .remove()
> callback.
>
> Drop the now-unused iio_interrupt_trigger_info structure: its
> only purpose was to hold the IRQ number for the manual free_irq()
> call in .remove(), which is no longer needed. The matching
> linux/slab.h include is also dropped.

...

> Signed-off-by: Stepan Ionichev <sozdayvek@xxxxxxxxx>
> ---
> v2:
> - Drop the dev_err() call after devm_request_irq(); really_probe()
> in the driver core already logs probe failures, so the message
> would be duplicate (per Andy)

FWIW, it's IRQ core (not driver core!) that does printing.

> - Use a local struct device *dev = &pdev->dev (per Joshua)
> - Drop the "No functional change" claim from the commit message;
> the resource lifecycle model changes (per Joshua)
> - Use .remove() function notation in the commit message (per Andy)

--
With Best Regards,
Andy Shevchenko