]> git.itanic.dy.fi Git - linux-stable/commit
clk: core: Fix runtime PM sequence in clk_core_unprepare()
authorChen-Yu Tsai <wenst@chromium.org>
Mon, 22 Aug 2022 08:14:24 +0000 (16:14 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2022 10:17:03 +0000 (12:17 +0200)
commit71f953e61c8236a3dc3abf4a0f60d955ca2add9f
tree134119b0ade93a501e6caf34cc5a36ec846fca9a
parent99b25cebdb35df2680c3d81d96769b78ab1412d5
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@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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/clk.c