SH: use for_each_of_cpu_node iterator
authorRob Herring <robh@kernel.org>
Mon, 27 Aug 2018 14:43:40 +0000 (09:43 -0500)
committerRob Herring <robh@kernel.org>
Fri, 28 Sep 2018 19:25:58 +0000 (14:25 -0500)
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: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: linux-sh@vger.kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
arch/sh/boards/of-generic.c

index 26789ad2819360fc2e480e51185a4c3161cbe972..cde370cad4ae3c0b447929a63e6d197c0a38f562 100644 (file)
@@ -64,7 +64,7 @@ static void sh_of_smp_probe(void)
 
        init_cpu_possible(cpumask_of(0));
 
-       for_each_node_by_type(np, "cpu") {
+       for_each_of_cpu_node(np) {
                const __be32 *cell = of_get_property(np, "reg", NULL);
                u64 id = -1;
                if (cell) id = of_read_number(cell, of_n_addr_cells(np));