Re: spi: imx: Use devm_clk_get_enabled() calls in spi_imx_probe()
From: Mark Brown
Date: Mon Nov 23 2026 - 14:03:02 EST
On Mon, Nov 23, 2026 at 08:49:50PM +0200, Andy Shevchenko wrote:
> On Mon, Nov 23, 2026 at 07:24:21PM +0100, Markus Elfring wrote:
> > >> * Reuse existing functionality from devm_clk_get_enabled() instead of
> > >> keeping duplicate source code.
> > >>
> > >> * Delete clk_disable_unprepare() calls on error handling paths.
> > >>
> > >> * Omit the label “out_put_per”.
> > >>
> > >> This issue was detected by using the Coccinelle software.
> > >
> > > This now messes up with the PM callbacks at remove stage.
> > > It's not trivial how to make it correct.
> > Is there a need to adjust and extend devres programming interfaces any more?
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/driver-api/driver-model/devres.rst?h=v7.4-rc4#n242
>
> I guess you did get my point. You can't simply do what you have done in this
> patch, because the devm*() will do something with clock reference counting on
> remove stage _after_ the driver.
Feel free to ignore Markus, he has a long history of sending
unhelpful review comments and continues to ignore repeated requests
to stop.
Attachment:
signature.asc
Description: PGP signature