From patchwork Tue Nov 24 08:19:13 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grant Likely X-Patchwork-Id: 39169 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 621D4101F8A for ; Tue, 24 Nov 2009 19:19:18 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932204AbZKXITK (ORCPT ); Tue, 24 Nov 2009 03:19:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932205AbZKXITK (ORCPT ); Tue, 24 Nov 2009 03:19:10 -0500 Received: from mail-pw0-f42.google.com ([209.85.160.42]:55220 "EHLO mail-pw0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932204AbZKXITJ (ORCPT ); Tue, 24 Nov 2009 03:19:09 -0500 Received: by mail-pw0-f42.google.com with SMTP id 3so4008275pwi.21 for ; Tue, 24 Nov 2009 00:19:16 -0800 (PST) Received: by 10.114.187.37 with SMTP id k37mr11571487waf.49.1259050756080; Tue, 24 Nov 2009 00:19:16 -0800 (PST) Received: from angua (S01060002b3d79728.cg.shawcable.net [68.146.87.181]) by mx.google.com with ESMTPS id 22sm3104655pxi.2.2009.11.24.00.19.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 24 Nov 2009 00:19:15 -0800 (PST) Received: from [127.0.1.1] (unknown [IPv6:::1]) by angua (Postfix) with ESMTP id B30A8257B; Tue, 24 Nov 2009 01:19:13 -0700 (MST) From: Grant Likely Subject: [PATCH 07/11] of: merge machine_is_compatible() To: linuxppc-dev@lists.ozlabs.org, devicetree-discuss@lists.ozlabs.org, sparclinux@vger.kernel.org, microblaze-uclinux@itee.uq.edu.au, benh@kernel.crashing.org, sfr@canb.auug.org.au, davem@davemloft.net, monstr@monstr.eu Date: Tue, 24 Nov 2009 01:19:13 -0700 Message-ID: <20091124081906.6216.67035.stgit@angua> In-Reply-To: <20091124081316.6216.66310.stgit@angua> References: <20091124081316.6216.66310.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/kernel/prom.c | 18 ------------------ arch/powerpc/kernel/prom.c | 18 ------------------ drivers/of/base.c | 18 ++++++++++++++++++ 3 files changed, 18 insertions(+), 36 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/kernel/prom.c b/arch/microblaze/kernel/prom.c index 543465a..c97192d 100644 --- a/arch/microblaze/kernel/prom.c +++ b/arch/microblaze/kernel/prom.c @@ -281,24 +281,6 @@ void __init early_init_devtree_arch(void) /* No Microblaze specific code here */ } -/** - * Indicates whether the root node has a given value in its - * compatible property. - */ -int machine_is_compatible(const char *compat) -{ - struct device_node *root; - int rc = 0; - - root = of_find_node_by_path("/"); - if (root) { - rc = of_device_is_compatible(root, compat); - of_node_put(root); - } - return rc; -} -EXPORT_SYMBOL(machine_is_compatible); - /******* * * New implementation of the OF "find" APIs, return a refcounted diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index a5b3b9d..65de093 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -677,24 +677,6 @@ void __init early_init_devtree_arch(void) lmb_enforce_memory_limit(limit); } -/** - * Indicates whether the root node has a given value in its - * compatible property. - */ -int machine_is_compatible(const char *compat) -{ - struct device_node *root; - int rc = 0; - - root = of_find_node_by_path("/"); - if (root) { - rc = of_device_is_compatible(root, compat); - of_node_put(root); - } - return rc; -} -EXPORT_SYMBOL(machine_is_compatible); - /******* * * New implementation of the OF "find" APIs, return a refcounted diff --git a/drivers/of/base.c b/drivers/of/base.c index ec56739..e81558f 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c @@ -144,6 +144,24 @@ int of_device_is_compatible(const struct device_node *device, EXPORT_SYMBOL(of_device_is_compatible); /** + * Indicates whether the root node has a given value in its + * compatible property. + */ +int machine_is_compatible(const char *compat) +{ + struct device_node *root; + int rc = 0; + + root = of_find_node_by_path("/"); + if (root) { + rc = of_device_is_compatible(root, compat); + of_node_put(root); + } + return rc; +} +EXPORT_SYMBOL(machine_is_compatible); + +/** * of_device_is_available - check if a device is available for use * * @device: Node to check for availability