From patchwork Wed Oct 7 04:31:24 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 35240 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id BBE9CB7BA7 for ; Wed, 7 Oct 2009 15:36:36 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751095AbZJGEbi (ORCPT ); Wed, 7 Oct 2009 00:31:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751798AbZJGEbh (ORCPT ); Wed, 7 Oct 2009 00:31:37 -0400 Received: from mail-px0-f179.google.com ([209.85.216.179]:36167 "EHLO mail-px0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751095AbZJGEbh (ORCPT ); Wed, 7 Oct 2009 00:31:37 -0400 Received: by mail-px0-f179.google.com with SMTP id 9so4469188pxi.4 for ; Tue, 06 Oct 2009 21:31:26 -0700 (PDT) Received: by 10.114.236.32 with SMTP id j32mr3895262wah.141.1254889886485; Tue, 06 Oct 2009 21:31:26 -0700 (PDT) Received: from angua (S01060016b61d1226.cg.shawcable.net [68.146.92.145]) by mx.google.com with ESMTPS id 21sm3037921pxi.3.2009.10.06.21.31.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 06 Oct 2009 21:31:25 -0700 (PDT) Received: from [127.0.1.1] (unknown [IPv6:::1]) by angua (Postfix) with ESMTP id 954BFAB8; Tue, 6 Oct 2009 22:31:24 -0600 (MDT) From: Grant Likely Subject: [RFC PATCH 07/12] of: merge of_node_*_flag() and set_node_proc_entry() To: linuxppc-dev@lists.ozlabs.org, benh@kernel.crashing.org, Stephen Rothwell , davem@davemloft.net, sparclinux@vger.kernel.org, monstr@monstr.eu, microblaze-uclinux@itee.uq.edu.au, devicetree-discuss@lists.ozlabs.org Date: Tue, 06 Oct 2009 22:31:24 -0600 Message-ID: <20091007043117.16890.91667.stgit@angua> In-Reply-To: <20091007041007.16890.62194.stgit@angua> References: <20091007041007.16890.62194.stgit@angua> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Merge common code between PowerPC and Microblaze Signed-off-by: Grant Likely --- arch/microblaze/include/asm/prom.h | 16 ---------------- arch/powerpc/include/asm/prom.h | 17 ----------------- include/linux/of.h | 16 ++++++++++++++++ 3 files changed, 16 insertions(+), 33 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/microblaze/include/asm/prom.h b/arch/microblaze/include/asm/prom.h index dfc4afc..180d844 100644 --- a/arch/microblaze/include/asm/prom.h +++ b/arch/microblaze/include/asm/prom.h @@ -35,24 +35,8 @@ extern struct device_node *of_chosen; -static inline int of_node_check_flag(struct device_node *n, unsigned long flag) -{ - return test_bit(flag, &n->_flags); -} - -static inline void of_node_set_flag(struct device_node *n, unsigned long flag) -{ - set_bit(flag, &n->_flags); -} - #define HAVE_ARCH_DEVTREE_FIXUPS -static inline void set_node_proc_entry(struct device_node *dn, - struct proc_dir_entry *de) -{ - dn->pde = de; -} - extern struct device_node *allnodes; /* temporary while merging */ extern rwlock_t devtree_lock; /* temporary while merging */ diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h index ef20e6c..2cfd432 100644 --- a/arch/powerpc/include/asm/prom.h +++ b/arch/powerpc/include/asm/prom.h @@ -32,25 +32,8 @@ extern struct device_node *of_chosen; -static inline int of_node_check_flag(struct device_node *n, unsigned long flag) -{ - return test_bit(flag, &n->_flags); -} - -static inline void of_node_set_flag(struct device_node *n, unsigned long flag) -{ - set_bit(flag, &n->_flags); -} - - #define HAVE_ARCH_DEVTREE_FIXUPS -static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) -{ - dn->pde = de; -} - - extern struct device_node *of_find_all_nodes(struct device_node *prev); extern struct device_node *of_node_get(struct device_node *node); extern void of_node_put(struct device_node *node); diff --git a/include/linux/of.h b/include/linux/of.h index a66c1eb..d5f6662 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -63,6 +63,22 @@ struct device_node { #endif }; +static inline int of_node_check_flag(struct device_node *n, unsigned long flag) +{ + return test_bit(flag, &n->_flags); +} + +static inline void of_node_set_flag(struct device_node *n, unsigned long flag) +{ + set_bit(flag, &n->_flags); +} + +static inline void +set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de) +{ + dn->pde = de; +} + #include /* flag descriptions */