@@ -1228,6 +1228,9 @@ static void __init clk_unprepare_unused_subtree(struct clk_core *core)
hlist_for_each_entry(child, &core->children, child_node)
clk_unprepare_unused_subtree(child);
+ if (core->consumers_count)
+ return;
+
if (core->prepare_count)
return;
@@ -1259,6 +1262,9 @@ static void __init clk_disable_unused_subtree(struct clk_core *core)
hlist_for_each_entry(child, &core->children, child_node)
clk_disable_unused_subtree(child);
+ if (core->consumers_count)
+ return;
+
if (core->flags & CLK_OPS_PARENT_ENABLE)
clk_core_prepare_enable(core->parent);
If a clock has already consumers, it should be considered as used. So clk_disable_unused should leave it as is. Signed-off-by: Abel Vesa <abel.vesa@linaro.org> --- drivers/clk/clk.c | 6 ++++++ 1 file changed, 6 insertions(+)