Re: [PATCH v5 14/18] iio: magnetometer: ak8975: switch to using managed resources

From: Joshua Crofts

Date: Tue May 05 2026 - 10:41:05 EST


On Tue, 5 May 2026 at 13:46, Joshua Crofts via B4 Relay
<devnull+joshua.crofts1.gmail.com@xxxxxxxxxx> wrote:
>
> From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
>
> Switch the driver to use managed resources (devm_*) which simplifier
> error handling and allows removing ak8975_remove() method from
> the driver.
>
> Note, on error path we now also set mode to POWER_DOWN state which is
> fine. Even if the device is in that mode, there is no problem to set
> that mode again, it should be no-op.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Co-developed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
> Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>

BTW, Sashiko timed out while reviewing this patch, didn't even know that's
possible.

--
Kind regards

CJD