Messages in this thread | | | From | Geert Uytterhoeven <> | Date | Tue, 31 Aug 2021 14:15:30 +0200 | Subject | Re: [PATCH v3 2/3] PM: runtime: add devm_pm_clk_create helper |
| |
Hi Dmitry,
Thanks for your patch!
On Sat, Jul 31, 2021 at 9:51 PM Dmitry Baryshkov <dmitry.baryshkov@linaro.org> wrote: > A typical code pattern for pm_clk_create() call is to call it in the > _probe function and to call pm_clk_destroy() both from _probe error path > and from _remove function. For some drivers the whole remove function > would consist of the call to pm_remove_disable().
Is it? I could find only one (drivers/clk/mmp/clk-audio.c). All other users call it from their PM Domain .attach_dev() callback, which cannot become managed.
> Add helper function to replace this bolierplate piece of code. Calling > devm_pm_clk_create() removes the need for calling pm_clk_destroy() both > in the probe()'s error path and in the remove() function. > > Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
| |