cpufreq: imx6q-cpufreq: remove device tree parsing for cpu nodes
authorSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Mon, 17 Jun 2013 13:58:48 +0000 (14:58 +0100)
committerSudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Wed, 21 Aug 2013 09:29:53 +0000 (10:29 +0100)
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.

Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
arch/arm/mach-imx/mach-imx6q.c
drivers/cpufreq/imx6q-cpufreq.c

index 7be13f8e69a01f22b43d28b4b22a42a23f006c8d..a02f275a198d4fbf38101ee5544110db8cb39936 100644 (file)
@@ -254,13 +254,12 @@ static void __init imx6q_opp_init(struct device *cpu_dev)
 {
        struct device_node *np;
 
-       np = of_find_node_by_path("/cpus/cpu@0");
+       np = of_node_get(cpu_dev->of_node);
        if (!np) {
                pr_warn("failed to find cpu0 node\n");
                return;
        }
 
-       cpu_dev->of_node = np;
        if (of_init_opp_table(cpu_dev)) {
                pr_warn("failed to init OPP table\n");
                goto put_node;
index e37cdaedbb5b39b244e3aa6caec947721297999d..b16632bb5a567b945f412c721ccdac42639b219d 100644 (file)
@@ -221,14 +221,12 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev)
 
        cpu_dev = &pdev->dev;
 
-       np = of_find_node_by_path("/cpus/cpu@0");
+       np = of_node_get(cpu_dev->of_node);
        if (!np) {
                dev_err(cpu_dev, "failed to find cpu0 node\n");
                return -ENOENT;
        }
 
-       cpu_dev->of_node = np;
-
        arm_clk = devm_clk_get(cpu_dev, "arm");
        pll1_sys_clk = devm_clk_get(cpu_dev, "pll1_sys");
        pll1_sw_clk = devm_clk_get(cpu_dev, "pll1_sw");