diff options
author | Rob Herring <robh@kernel.org> | 2018-08-27 16:42:49 +0200 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-09-28 21:25:58 +0200 |
commit | 5af5d40c401581399f2b6a646a83ad0f31015eb6 (patch) | |
tree | eda1a4408a4bcdf3a4b303be898f7fe498230a06 /arch/arm/mach-shmobile/pm-rcar-gen2.c | |
parent | ARM: topology: remove unneeded check for /cpus node (diff) | |
download | linux-5af5d40c401581399f2b6a646a83ad0f31015eb6.tar.xz linux-5af5d40c401581399f2b6a646a83ad0f31015eb6.zip |
ARM: shmobile: 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: Magnus Damm <magnus.damm@gmail.com>
Cc: Russell King <linux@armlinux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-renesas-soc@vger.kernel.org
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'arch/arm/mach-shmobile/pm-rcar-gen2.c')
-rw-r--r-- | arch/arm/mach-shmobile/pm-rcar-gen2.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c index 345af3ebcc3a..7efe95bd584f 100644 --- a/arch/arm/mach-shmobile/pm-rcar-gen2.c +++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c @@ -50,7 +50,7 @@ void __init rcar_gen2_pm_init(void) void __iomem *p; u32 bar; static int once; - struct device_node *np, *cpus; + struct device_node *np; bool has_a7 = false; bool has_a15 = false; struct resource res; @@ -59,11 +59,7 @@ void __init rcar_gen2_pm_init(void) if (once++) return; - cpus = of_find_node_by_path("/cpus"); - if (!cpus) - return; - - for_each_child_of_node(cpus, np) { + for_each_of_cpu_node(np) { if (of_device_is_compatible(np, "arm,cortex-a15")) has_a15 = true; else if (of_device_is_compatible(np, "arm,cortex-a7")) |