summaryrefslogtreecommitdiffstats
path: root/arch/c6x
diff options
context:
space:
mode:
Diffstat (limited to 'arch/c6x')
-rw-r--r--arch/c6x/kernel/setup.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c
index 509c5f0864964..05d96a9541b58 100644
--- a/arch/c6x/kernel/setup.c
+++ b/arch/c6x/kernel/setup.c
@@ -96,7 +96,7 @@ static void __init get_cpuinfo(void)
unsigned long core_khz;
u64 tmp;
struct cpuinfo_c6x *p;
- struct device_node *node, *np;
+ struct device_node *node;
p = &per_cpu(cpu_data, smp_processor_id());
@@ -190,13 +190,8 @@ static void __init get_cpuinfo(void)
p->core_id = get_coreid();
- node = of_find_node_by_name(NULL, "cpus");
- if (node) {
- for_each_child_of_node(node, np)
- if (!strcmp("cpu", np->name))
- ++c6x_num_cores;
- of_node_put(node);
- }
+ for_each_of_cpu_node(node)
+ ++c6x_num_cores;
node = of_find_node_by_name(NULL, "soc");
if (node) {