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@xxxxxxxxxx> --- drivers/clk/clk.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index e412e83a6e28..6cce31ea4f72 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -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); -- 2.34.3