From e768f350c8c3d4253011282db771f35af37ee59a Mon Sep 17 00:00:00 2001 From: Sudeep KarkadaNagesha Date: Mon, 17 Jun 2013 15:09:51 +0100 Subject: cpufreq: kirkwood-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 all DT parsing and uses cpu->of_node instead. Cc: Jason Cooper Acked-by: Andrew Lunn Acked-by: Viresh Kumar Signed-off-by: Sudeep KarkadaNagesha --- drivers/cpufreq/kirkwood-cpufreq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/cpufreq/kirkwood-cpufreq.c') diff --git a/drivers/cpufreq/kirkwood-cpufreq.c b/drivers/cpufreq/kirkwood-cpufreq.c index c233ea617366..25ac2cb15a43 100644 --- a/drivers/cpufreq/kirkwood-cpufreq.c +++ b/drivers/cpufreq/kirkwood-cpufreq.c @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -175,9 +175,11 @@ static int kirkwood_cpufreq_probe(struct platform_device *pdev) if (IS_ERR(priv.base)) return PTR_ERR(priv.base); - np = of_find_node_by_path("/cpus/cpu@0"); - if (!np) + np = of_cpu_device_node_get(0); + if (!np) { + dev_err(&pdev->dev, "failed to get cpu device node\n"); return -ENODEV; + } priv.cpu_clk = of_clk_get_by_name(np, "cpu_clk"); if (IS_ERR(priv.cpu_clk)) { -- cgit v1.2.3-59-g8ed1b