Re: [PATCH v6 2/2] mfd: mxs-lradc: Convert to devm_clk_get_enabled()
From: Markus Elfring
Date: Sat Nov 28 2026 - 07:48:45 EST
> The LRADC clock is acquired with a managed helper but enabled and
> disabled manually.
>
> Acquire the LRADC clock with devm_clk_get_enabled() instead of a bare
> devm_clk_get() followed by a manual clk_prepare_enable(), so it is
> prepared/enabled for the device lifetime and released on unbind.
>
> This conversion makes the code simpler.
Is it still required to store the clock object within the data structure?
https://elixir.bootlin.com/linux/v7.4-rc2/source/include/linux/mfd/mxs-lradc.h#L150-L164
Would a local variable become sufficient after the proposed source code transformation?
https://elixir.bootlin.com/linux/v7.4-rc2/source/drivers/mfd/mxs-lradc.c#L126-L231
Regards,
Markus