Commit 76ec23b1 authored by Rob Herring's avatar Rob Herring
Browse files

clk: mvebu: use for_each_of_cpu_node iterator



Use the for_each_of_cpu_node iterator to iterate over cpu nodes. This
has the side effect of defaulting to iterating using "cpu" node names in
preference to the deprecated (for FDT) device_type == "cpu".

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: linux-clk@vger.kernel.org
Acked-by: default avatarStephen Boyd <sboyd@kernel.org>
Signed-off-by: default avatarRob Herring <robh@kernel.org>
parent 7de8f4aa
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -183,7 +183,7 @@ static void __init of_cpu_clk_setup(struct device_node *node)
		pr_warn("%s: pmu-dfs base register not set, dynamic frequency scaling not available\n",
		pr_warn("%s: pmu-dfs base register not set, dynamic frequency scaling not available\n",
			__func__);
			__func__);


	for_each_node_by_type(dn, "cpu")
	for_each_of_cpu_node(dn)
		ncpus++;
		ncpus++;


	cpuclk = kcalloc(ncpus, sizeof(*cpuclk), GFP_KERNEL);
	cpuclk = kcalloc(ncpus, sizeof(*cpuclk), GFP_KERNEL);
@@ -194,7 +194,7 @@ static void __init of_cpu_clk_setup(struct device_node *node)
	if (WARN_ON(!clks))
	if (WARN_ON(!clks))
		goto clks_out;
		goto clks_out;


	for_each_node_by_type(dn, "cpu") {
	for_each_of_cpu_node(dn) {
		struct clk_init_data init;
		struct clk_init_data init;
		struct clk *clk;
		struct clk *clk;
		char *clk_name = kzalloc(5, GFP_KERNEL);
		char *clk_name = kzalloc(5, GFP_KERNEL);