Commit 3e5dd6f6 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Stephen Boyd

clk: Ignore disabled DT clock providers

of_clk_init() uses for_each_matching_node_and_match() to find clock
providers, which returns all matching device nodes, whether they are
enabled or not. Hence clock providers that are disabled explicitly in DT
using e.g.

	"status = "disabled";

are still activated.

Add a check to ignore device nodes that are not enabled, like
of_irq_init() does.
Reported-by: default avatarRamesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 023bd716
...@@ -3138,6 +3138,9 @@ void __init of_clk_init(const struct of_device_id *matches) ...@@ -3138,6 +3138,9 @@ void __init of_clk_init(const struct of_device_id *matches)
for_each_matching_node_and_match(np, matches, &match) { for_each_matching_node_and_match(np, matches, &match) {
struct clock_provider *parent; struct clock_provider *parent;
if (!of_device_is_available(np))
continue;
parent = kzalloc(sizeof(*parent), GFP_KERNEL); parent = kzalloc(sizeof(*parent), GFP_KERNEL);
if (!parent) { if (!parent) {
list_for_each_entry_safe(clk_provider, next, list_for_each_entry_safe(clk_provider, next,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment