This is a note to let you know that I've just added the patch titled clk: core: Fix runtime PM sequence in clk_core_unprepare() to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: clk-core-fix-runtime-pm-sequence-in-clk_core_unprepa.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 78dee23eecbe6f385e509195960205a3efdfec0f Author: Chen-Yu Tsai <wenst@xxxxxxxxxxxx> Date: Mon Aug 22 16:14:24 2022 +0800 clk: core: Fix runtime PM sequence in clk_core_unprepare() [ Upstream commit 4b592061f7b3971c70e8b72fc42aaead47c24701 ] In the original commit 9a34b45397e5 ("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: 9a34b45397e5 ("clk: Add support for runtime PM") Signed-off-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@xxxxxxxxxxxxx> Link: https://lore.kernel.org/r/20220822081424.1310926-3-wenst@xxxxxxxxxxxx Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 32606d1094fe4..53ac3a0e741d7 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -732,10 +732,9 @@ static void clk_core_unprepare(struct clk_core *core) if (core->ops->unprepare) core->ops->unprepare(core->hw); - clk_pm_runtime_put(core); - trace_clk_unprepare_complete(core); clk_core_unprepare(core->parent); + clk_pm_runtime_put(core); } static void clk_core_unprepare_lock(struct clk_core *core)