[PATCH v4 19/19] cpufreq: pmac32-cpufreq: remove device tree parsing for cpu nodes

From: Sudeep KarkadaNagesha
Date: Tue Aug 20 2013 - 05:31:17 EST


From: Sudeep KarkadaNagesha <sudeep.karkadanagesha@xxxxxxx>

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@xxxxxxxxxxxxxxxxxxx>
Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@xxxxxxx>
---
drivers/cpufreq/pmac32-cpufreq.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/cpufreq/pmac32-cpufreq.c b/drivers/cpufreq/pmac32-cpufreq.c
index 3104fad..56bfb6f 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;

--
1.8.1.2


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/