Skip to content

Commit 4b59206

Browse files
wensbebarino
authored andcommitted
clk: core: Fix runtime PM sequence in clk_core_unprepare()
In the original commit 9a34b45 ("clk: Add support for runtime PM"), the commit message mentioned that pm_runtime_put_sync() would be done at the end of clk_core_unprepare(). This mirrors the operations in clk_core_prepare() in the opposite order. However, the actual code that was added wasn't in the order the commit message described. Move clk_pm_runtime_put() to the end of clk_core_unprepare() so that it is in the correct order. Fixes: 9a34b45 ("clk: Add support for runtime PM") Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Link: https://lore.kernel.org/r/20220822081424.1310926-3-wenst@chromium.org Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 35b0fac commit 4b59206

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/clk/clk.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,13 +859,12 @@ static void clk_core_unprepare(struct clk_core *core)
859859
if (core->ops->unprepare)
860860
core->ops->unprepare(core->hw);
861861

862-
clk_pm_runtime_put(core);
863-
864862
trace_clk_unprepare_complete(core);
865863

866864
if (core->flags & CLK_OPS_PARENT_ENABLE)
867865
clk_core_disable_lock(core->parent);
868866
clk_core_unprepare(core->parent);
867+
clk_pm_runtime_put(core);
869868
}
870869

871870
static void clk_core_unprepare_lock(struct clk_core *core)

0 commit comments

Comments
 (0)