[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220712113402.871838-3-wenst@chromium.org>
Date: Tue, 12 Jul 2022 19:34:02 +0800
From: Chen-Yu Tsai <wenst@...omium.org>
To: Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>
Cc: Chen-Yu Tsai <wenst@...omium.org>, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
NĂcolas F. R. A. Prado
<nfraprado@...labora.com>
Subject: [PATCH 2/2] clk: core: Fix runtime PM sequence in clk_core_unprepare()
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@...omium.org>
---
drivers/clk/clk.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index b3de636eec84..87684daadedd 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -855,13 +855,12 @@ 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);
if (core->flags & CLK_OPS_PARENT_ENABLE)
clk_core_disable(core->parent);
clk_core_unprepare(core->parent);
+ clk_pm_runtime_put(core);
}
static void clk_core_unprepare_lock(struct clk_core *core)
--
2.37.0.144.g8ac04bfd2-goog
Powered by blists - more mailing lists