From patchwork Sat Jan 23 09:20:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 60247 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp353061lbb; Sat, 23 Jan 2016 01:27:30 -0800 (PST) X-Received: by 10.28.103.215 with SMTP id b206mr8533891wmc.93.1453541250217; Sat, 23 Jan 2016 01:27:30 -0800 (PST) Return-Path: Received: from lists.xen.org (lists.xenproject.org. [50.57.142.19]) by mx.google.com with ESMTPS id b200si9998579wme.17.2016.01.23.01.27.29 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 23 Jan 2016 01:27:30 -0800 (PST) Received-SPF: neutral (google.com: 50.57.142.19 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) client-ip=50.57.142.19; Authentication-Results: mx.google.com; spf=neutral (google.com: 50.57.142.19 is neither permitted nor denied by best guess record for domain of xen-devel-bounces@lists.xen.org) smtp.mailfrom=xen-devel-bounces@lists.xen.org Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aMuSX-0000RC-GT; Sat, 23 Jan 2016 09:26:17 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aMuSW-0000Qh-5i for xen-devel@lists.xen.org; Sat, 23 Jan 2016 09:26:16 +0000 Received: from [193.109.254.147] by server-15.bemta-14.messagelabs.com id 15/35-10115-73743A65; Sat, 23 Jan 2016 09:26:15 +0000 X-Env-Sender: zhaoshenglong@huawei.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1453541164!16895614!1 X-Originating-IP: [58.251.152.64] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 19091 invoked from network); 23 Jan 2016 09:26:10 -0000 Received: from szxga01-in.huawei.com (HELO szxga01-in.huawei.com) (58.251.152.64) by server-2.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 23 Jan 2016 09:26:10 -0000 Received: from 172.24.1.51 (EHLO szxeml427-hub.china.huawei.com) ([172.24.1.51]) by szxrg01-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id DDP82361; Sat, 23 Jan 2016 17:22:36 +0800 (CST) Received: from HGHY1Z002260041.china.huawei.com (10.177.16.142) by szxeml427-hub.china.huawei.com (10.82.67.182) with Microsoft SMTP Server id 14.3.235.1; Sat, 23 Jan 2016 17:22:26 +0800 From: Shannon Zhao To: Date: Sat, 23 Jan 2016 17:20:12 +0800 Message-ID: <1453540813-15764-21-git-send-email-zhaoshenglong@huawei.com> X-Mailer: git-send-email 1.9.0.msysgit.0 In-Reply-To: <1453540813-15764-1-git-send-email-zhaoshenglong@huawei.com> References: <1453540813-15764-1-git-send-email-zhaoshenglong@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.177.16.142] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090205.56A3465E.0010, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 2443f9a068dc68ce38d20d98b1c007a1 Cc: ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, peter.huangpeng@huawei.com, julien.grall@citrix.com, stefano.stabellini@citrix.com, shannon.zhao@linaro.org Subject: [Xen-devel] [PATCH v4 20/21] arm/fdt: Export device_tree_for_each_node X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org From: Shannon Zhao This function will be used by ACPI booting. Export it so that it can be used by other files. Signed-off-by: Shannon Zhao --- xen/arch/arm/bootfdt.c | 6 +++--- xen/include/xen/device_tree.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) -- 2.0.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel diff --git a/xen/arch/arm/bootfdt.c b/xen/arch/arm/bootfdt.c index 74d208b..8a14015 100644 --- a/xen/arch/arm/bootfdt.c +++ b/xen/arch/arm/bootfdt.c @@ -85,9 +85,9 @@ static u32 __init device_tree_get_u32(const void *fdt, int node, * Returns 0 if all nodes were iterated over successfully. If @func * returns a value different from 0, that value is returned immediately. */ -static int __init device_tree_for_each_node(const void *fdt, - device_tree_node_func func, - void *data) +int __init device_tree_for_each_node(const void *fdt, + device_tree_node_func func, + void *data) { int node; int depth; diff --git a/xen/include/xen/device_tree.h b/xen/include/xen/device_tree.h index cf31e50..12942cf 100644 --- a/xen/include/xen/device_tree.h +++ b/xen/include/xen/device_tree.h @@ -173,6 +173,10 @@ typedef int (*device_tree_node_func)(const void *fdt, extern const void *device_tree_flattened; +int __init device_tree_for_each_node(const void *fdt, + device_tree_node_func func, + void *data); + /** * dt_unflatten_host_device_tree - Unflatten the host device tree *