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: 1130771 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D66D9DFFAD for ; Fri, 29 Jun 2012 06:48:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751257Ab2F2GsB (ORCPT ); Fri, 29 Jun 2012 02:48:01 -0400 Received: from e5.ny.us.ibm.com ([32.97.182.145]:56502 "EHLO e5.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751258Ab2F2GsA (ORCPT ); Fri, 29 Jun 2012 02:48:00 -0400 Received: from /spool/local by e5.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 29 Jun 2012 02:47:59 -0400 Received: from d01relay04.pok.ibm.com (9.56.227.236) by e5.ny.us.ibm.com (192.168.1.105) 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 d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q5T6lvsc400230 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 q5T6lu2H001102 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 Cc: bhelgaas@google.com, yinghai@kernel.org, benh@kernel.crashing.org, linuxram@us.ibm.com, Gavin Shan 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-5930-0000-0000-000009611395 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org 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);