summaryrefslogtreecommitdiff
path: root/arch/arm/mach-shmobile/timer.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-08-27 17:42:49 +0300
committerRob Herring <robh@kernel.org>2018-09-28 22:25:58 +0300
commit5af5d40c401581399f2b6a646a83ad0f31015eb6 (patch)
treeeda1a4408a4bcdf3a4b303be898f7fe498230a06 /arch/arm/mach-shmobile/timer.c
parent07d44f1f82b780a597fddc677d761417f2af8452 (diff)
downloadlinux-5af5d40c401581399f2b6a646a83ad0f31015eb6.tar.xz
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/timer.c')
-rw-r--r--arch/arm/mach-shmobile/timer.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
index 828e8aea037e..e48b0939693f 100644
--- a/arch/arm/mach-shmobile/timer.c
+++ b/arch/arm/mach-shmobile/timer.c
@@ -22,22 +22,16 @@
void __init shmobile_init_delay(void)
{
- struct device_node *np, *cpus;
+ struct device_node *np;
u32 max_freq = 0;
- cpus = of_find_node_by_path("/cpus");
- if (!cpus)
- return;
-
- for_each_child_of_node(cpus, np) {
+ for_each_of_cpu_node(np) {
u32 freq;
if (!of_property_read_u32(np, "clock-frequency", &freq))
max_freq = max(max_freq, freq);
}
- of_node_put(cpus);
-
if (!max_freq)
return;