From patchwork Fri Sep 14 08:19:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas KANDAGATLA X-Patchwork-Id: 183883 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id 28B672C08A9 for ; Fri, 14 Sep 2012 20:57:59 +1000 (EST) Received: from eu1sys200aog112.obsmtp.com (eu1sys200aog112.obsmtp.com [207.126.144.133]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 88DBA2C0080 for ; Fri, 14 Sep 2012 19:40:36 +1000 (EST) Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob112.postini.com ([207.126.147.11]) with SMTP ID DSNKUFL7kSmBfHQVQdP4CtruzSaSmTprVVps@postini.com; Fri, 14 Sep 2012 09:40:38 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 98E6CCF; Fri, 14 Sep 2012 08:22:22 +0000 (GMT) Received: from mail7.sgp.st.com (mail7.sgp.st.com [164.129.223.81]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 516AD29F2; Fri, 14 Sep 2012 08:22:22 +0000 (GMT) Received: from localhost (king.bri.st.com [10.65.51.147]) by mail7.sgp.st.com (MOS 4.3.3-GA) with ESMTP id ANI62637 (AUTH srinivak); Fri, 14 Sep 2012 10:22:21 +0200 From: Srinivas KANDAGATLA To: benh@kernel.crashing.org Subject: [PATCH v2 4/7] dt/powerpc/sysdev: Use of_get_child_by_name to get a named child. Date: Fri, 14 Sep 2012 09:19:24 +0100 Message-Id: <1347610764-20227-1-git-send-email-srinivas.kandagatla@st.com> X-Mailer: git-send-email 1.7.0.4 X-Mailman-Approved-At: Fri, 14 Sep 2012 20:55:18 +1000 Cc: robherring2@gmail.com, devicetree-discuss@lists.ozlabs.org, linuxppc-dev@lists.ozlabs.org, srinivas.kandagatla@st.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" From: Srinivas Kandagatla As follow-up to "dt: introduce of_get_child_by_name to get child node by name." patch, This patch removes some of the code duplication in the driver by replacing it with of_get_child_by_name instead. Signed-off-by: Srinivas Kandagatla --- arch/powerpc/sysdev/qe_lib/qe.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-) diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index b043675..fd1c15d 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c @@ -568,10 +568,7 @@ struct qe_firmware_info *qe_get_firmware_info(void) } /* Find the 'firmware' child node */ - for_each_child_of_node(qe, fw) { - if (strcmp(fw->name, "firmware") == 0) - break; - } + fw = of_get_child_by_name(qe "firmware"); of_node_put(qe);