Re: [PATCH v2 3/6] iio: amplifiers: ad8366: refactor device resource management

From: Andy Shevchenko

Date: Tue Jan 27 2026 - 16:12:36 EST


On Mon, Jan 26, 2026 at 01:51:04PM +0000, Rodrigo Alencar via B4 Relay wrote:

> Adhere modern device resource management with the following:
> - Voltage regulator managed and enabled internally;
> - Proper mutex lifecycle with devm_mutex_init(), replacing mutex_init();
> - IIO device registration handled with devm_iio_device_register();
> - removal of goto's from the probe function;
> - ad8366_remove() removed as it is not needed anymore;
>
> Also, dev_err_probe() is used to report probe errors with created local
> device pointer.

And also it uses the temporary dev variable in the cases that are not covered
by the above.

So, three changes in one patch...

Dunno if Jonathan is okay with this. I would rather split it.
Code wise LGTM.

--
With Best Regards,
Andy Shevchenko