summaryrefslogtreecommitdiff
path: root/drivers/cpufreq/pmac32-cpufreq.c
diff options
context:
space:
mode:
authorSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>2013-07-17 13:52:17 +0100
committerSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>2013-08-21 10:29:56 +0100
commit1037b2752345cc5666e90b711a913ab2ae6c5920 (patch)
tree1cb327c88818a84c6fb8c3c4c9f4424f2d427199 /drivers/cpufreq/pmac32-cpufreq.c
parent760287ab90a3ca93a2f87f7e7137e06e89a26b01 (diff)
downloadlwn-1037b2752345cc5666e90b711a913ab2ae6c5920.tar.gz
lwn-1037b2752345cc5666e90b711a913ab2ae6c5920.zip
cpufreq: pmac32-cpufreq: remove device tree parsing for cpu nodes
Now that the cpu device registration initialises the of_node(if available) appropriately for all the cpus, parsing here is redundant. This patch removes DT parsing and uses cpu->of_node instead. Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Diffstat (limited to 'drivers/cpufreq/pmac32-cpufreq.c')
-rw-r--r--drivers/cpufreq/pmac32-cpufreq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index 3104fad82480..56bfb6f93630 100644
--- a/drivers/cpufreq/pmac32-cpufreq.c
+++ b/drivers/cpufreq/pmac32-cpufreq.c
@@ -25,6 +25,7 @@
#include <linux/init.h>
#include <linux/device.h>
#include <linux/hardirq.h>
+#include <linux/of_device.h>
#include <asm/prom.h>
#include <asm/machdep.h>
#include <asm/irq.h>
@@ -649,8 +650,8 @@ static int __init pmac_cpufreq_setup(void)
if (strstr(cmd_line, "nocpufreq"))
return 0;
- /* Assume only one CPU */
- cpunode = of_find_node_by_type(NULL, "cpu");
+ /* Get first CPU node */
+ cpunode = of_cpu_device_node_get(0);
if (!cpunode)
goto out;