From patchwork Fri Jun 29 06:47:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gavin Shan X-Patchwork-Id: 167999 X-Patchwork-Delegate: benh@kernel.crashing.org 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 84DD710080C for ; Fri, 29 Jun 2012 16:48:58 +1000 (EST) Received: by ozlabs.org (Postfix) id 06439B7016; Fri, 29 Jun 2012 16:48:05 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from e1.ny.us.ibm.com (e1.ny.us.ibm.com [32.97.182.141]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "e1.ny.us.ibm.com", Issuer "GeoTrust SSL CA" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 3E613B700D for ; Fri, 29 Jun 2012 16:48:03 +1000 (EST) Received: from /spool/local by e1.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 29 Jun 2012 02:48:00 -0400 Received: from d01relay06.pok.ibm.com (9.56.227.116) by e1.ny.us.ibm.com (192.168.1.101) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 29 Jun 2012 02:47:58 -0400 Received: from d01av03.pok.ibm.com (d01av03.pok.ibm.com [9.56.224.217]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5T6lvc45636534 for ; Fri, 29 Jun 2012 02:47:57 -0400 Received: from d01av03.pok.ibm.com (loopback [127.0.0.1]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q5T6lu2D001102 for ; Fri, 29 Jun 2012 03:47:57 -0300 Received: from shangw ([9.77.178.49]) by d01av03.pok.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q5T6ltvl001048; Fri, 29 Jun 2012 03:47:56 -0300 Received: by shangw (Postfix, from userid 1000) id 088903818B2; Fri, 29 Jun 2012 14:47:53 +0800 (CST) From: Gavin Shan To: linux-pci@vger.kernel.org, linuxppc-dev@ozlabs.org Subject: [PATCH 3/7] pci: make find_pci_host_bridge global Date: Fri, 29 Jun 2012 14:47:46 +0800 Message-Id: <5cc19d49348943cd7986fa74558e3b82cc60de73.1340949637.git.shangw@linux.vnet.ibm.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: x-cbid: 12062906-6078-0000-0000-00000CABEEEC Cc: bhelgaas@google.com, yinghai@kernel.org, Gavin Shan , linuxram@us.ibm.com X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.15rc1 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" The patch makes function find_pci_host_bridge() global so that the platforms (e.g. PPC) can access pci_host_bridge. Signed-off-by: Gavin Shan --- drivers/pci/host-bridge.c | 2 +- include/linux/pci.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index fc16357..a43d393 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c @@ -17,7 +17,7 @@ static struct pci_bus *find_pci_root_bus(struct pci_bus *bus) return bus; } -static struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus) +struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus) { struct pci_bus *root_bus = find_pci_root_bus(bus); diff --git a/include/linux/pci.h b/include/linux/pci.h index fefb4e1..615ac90 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -385,6 +385,7 @@ struct pci_host_bridge { }; #define to_pci_host_bridge(n) container_of(n, struct pci_host_bridge, dev) +struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus); void pci_set_host_bridge_release(struct pci_host_bridge *bridge, void (*release_fn)(struct pci_host_bridge *), void *release_data);