lkml.org 
[lkml]   [2021]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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

\
 
 \ /
  Last update: 2021-08-31 14:18    [W:0.117 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site