Skip to content

Commit

Permalink
clk: mvebu: use for_each_of_cpu_node iterator
Browse files Browse the repository at this point in the history
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: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Rob Herring <robh@kernel.org>
  • Loading branch information
Rob Herring committed Sep 28, 2018
1 parent 7de8f4a commit 76ec23b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/clk/mvebu/clk-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
__func__);

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

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

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

0 comments on commit 76ec23b

Please sign in to comment.