aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDong Aisheng <[email protected]>2017-12-22 17:46:04 +0800
committerStephen Boyd <[email protected]>2017-12-26 17:34:03 -0800
commit756efe131088b6e6e7f0124ff9c4e1f0165d3140 (patch)
tree9b6f57ac546ee543d41c14a1b13bd65d795ee4c4
parent61d2f2a05765a5f57149efbd93e3e81a83cbc2c1 (diff)
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 <[email protected]> Cc: Michael Turquette <[email protected]> Cc: Ulf Hansson <[email protected]> Cc: Marek Szyprowski <[email protected]> Fixes: 9a34b45397e5 ("clk: Add support for runtime PM") Signed-off-by: Dong Aisheng <[email protected]> Reviewed-by: Ulf Hansson <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
-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;
}