]> Git Repo - linux.git/commitdiff
clk: use atomic runtime pm api in clk_core_is_enabled
authorDong Aisheng <[email protected]>
Fri, 22 Dec 2017 09:46:04 +0000 (17:46 +0800)
committerStephen Boyd <[email protected]>
Wed, 27 Dec 2017 01:34:03 +0000 (17:34 -0800)
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]>
drivers/clk/clk.c

index 8a1860a36c778aba3b66de996a6cc7ee878cf97e..b56c11f51bafad32bafc7b5b9c7467e7cd16632b 100644 (file)
@@ -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;
 }
This page took 0.062183 seconds and 4 git commands to generate.