From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from service87.mimecast.com (service87.mimecast.com [91.220.42.44]) by ozlabs.org (Postfix) with ESMTP id 668082C0124 for ; Tue, 20 Aug 2013 19:30:23 +1000 (EST) From: Sudeep KarkadaNagesha To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH v4 13/19] cpufreq: highbank-cpufreq: remove device tree parsing for cpu nodes Date: Tue, 20 Aug 2013 10:30:15 +0100 Message-Id: <1376991021-12160-14-git-send-email-Sudeep.KarkadaNagesha@arm.com> In-Reply-To: <1376991021-12160-1-git-send-email-Sudeep.KarkadaNagesha@arm.com> References: <1374492747-13879-1-git-send-email-Sudeep.KarkadaNagesha@arm.com> <1376991021-12160-1-git-send-email-Sudeep.KarkadaNagesha@arm.com> Content-Type: text/plain; charset=WINDOWS-1252 Cc: Jonas Bonn , Michal Simek , Mark Langsdorf , Greg Kroah-Hartman , Sudeep KarkadaNagesha , Viresh Kumar , Rob Herring , "Rafael J. Wysocki" , Grant Likely List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Sudeep KarkadaNagesha 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: Mark Langsdorf Acked-by: Rob Herring Acked-by: Viresh Kumar Signed-off-by: Sudeep KarkadaNagesha --- drivers/cpufreq/highbank-cpufreq.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/cpufreq/highbank-cpufreq.c b/drivers/cpufreq/highbank-= cpufreq.c index b61b5a3..794123f 100644 --- a/drivers/cpufreq/highbank-cpufreq.c +++ b/drivers/cpufreq/highbank-cpufreq.c @@ -69,23 +69,17 @@ static int hb_cpufreq_driver_init(void) =09if (!of_machine_is_compatible("calxeda,highbank")) =09=09return -ENODEV; =20 -=09for_each_child_of_node(of_find_node_by_path("/cpus"), np) -=09=09if (of_get_property(np, "operating-points", NULL)) -=09=09=09break; - -=09if (!np) { -=09=09pr_err("failed to find highbank cpufreq node\n"); -=09=09return -ENOENT; -=09} - =09cpu_dev =3D get_cpu_device(0); =09if (!cpu_dev) { =09=09pr_err("failed to get highbank cpufreq device\n"); -=09=09ret =3D -ENODEV; -=09=09goto out_put_node; +=09=09return -ENODEV; =09} =20 -=09cpu_dev->of_node =3D np; +=09np =3D of_node_get(cpu_dev->of_node); +=09if (!np) { +=09=09pr_err("failed to find highbank cpufreq node\n"); +=09=09return -ENOENT; +=09} =20 =09cpu_clk =3D clk_get(cpu_dev, NULL); =09if (IS_ERR(cpu_clk)) { --=20 1.8.1.2