summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorDong Aisheng2017-12-22 10:46:04 +0100
committerStephen Boyd2017-12-27 02:34:03 +0100
commit756efe131088b6e6e7f0124ff9c4e1f0165d3140 (patch)
tree9b6f57ac546ee543d41c14a1b13bd65d795ee4c4 /drivers/clk/clk.c
parentclk: sunxi: sun9i-mmc: Implement reset callback for reset controls (diff)
downloadkernel-qcow2-linux-756efe131088b6e6e7f0124ff9c4e1f0165d3140.tar.gz
kernel-qcow2-linux-756efe131088b6e6e7f0124ff9c4e1f0165d3140.tar.xz
kernel-qcow2-linux-756efe131088b6e6e7f0124ff9c4e1f0165d3140.zip
clk: use atomic runtime pm api in clk_core_is_enabled
Current clk_pm_runtime_put is using pm_runtime_put_sync which is not safe to be called in clk_core_is_enabled as it should be able to run in atomic context. Thus use pm_runtime_put instead which is atomic safe. Cc: Stephen Boyd <sboyd@codeaurora.org> Cc: Michael Turquette <mturquette@baylibre.com> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Marek Szyprowski <m.szyprowski@samsung.com> Fixes: 9a34b45397e5 ("clk: Add support for runtime PM") Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 8a1860a36c77..b56c11f51baf 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -220,7 +220,8 @@ static bool clk_core_is_enabled(struct clk_core *core)
ret = core->ops->is_enabled(core->hw);
done:
- clk_pm_runtime_put(core);
+ if (core->dev)
+ pm_runtime_put(core->dev);
return ret;
}