From patchwork Wed Mar 25 06:32:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Lu X-Patchwork-Id: 6088661 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 967DEBF90F for ; Wed, 25 Mar 2015 06:34:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B5FCF202F2 for ; Wed, 25 Mar 2015 06:34:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B848520251 for ; Wed, 25 Mar 2015 06:34:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751278AbbCYGd7 (ORCPT ); Wed, 25 Mar 2015 02:33:59 -0400 Received: from mga02.intel.com ([134.134.136.20]:30115 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751212AbbCYGd7 (ORCPT ); Wed, 25 Mar 2015 02:33:59 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 24 Mar 2015 23:34:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,463,1422950400"; d="scan'208";a="697388692" Received: from aaronlu.sh.intel.com ([10.239.159.58]) by fmsmga002.fm.intel.com with ESMTP; 24 Mar 2015 23:33:57 -0700 Message-ID: <55125679.1080201@intel.com> Date: Wed, 25 Mar 2015 14:32:25 +0800 From: Aaron Lu MIME-Version: 1.0 To: "Rafael J. Wysocki" , Bjorn Helgaas CC: ACPI Devel Mailing List , Linux PCI Subject: [PATCH v3 2/3] PCI: rename find_pci_host_bridge and export it References: <54FD4FB9.2060802@intel.com> <55125611.8040507@intel.com> In-Reply-To: <55125611.8040507@intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The find_pci_host_bridge function can be useful to other PCI code so export it. In the meantime, change its name to more like other interfaces as pci_find_host_bridge. Signed-off-by: Aaron Lu --- drivers/pci/host-bridge.c | 6 +++--- drivers/pci/pci.h | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c index 3e5bbf9e8889..5f4a2e04c8d7 100644 --- a/drivers/pci/host-bridge.c +++ b/drivers/pci/host-bridge.c @@ -16,7 +16,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 *pci_find_host_bridge(struct pci_bus *bus) { struct pci_bus *root_bus = find_pci_root_bus(bus); @@ -48,7 +48,7 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge, void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region, struct resource *res) { - struct pci_host_bridge *bridge = find_pci_host_bridge(bus); + struct pci_host_bridge *bridge = pci_find_host_bridge(bus); struct resource_entry *window; resource_size_t offset = 0; @@ -73,7 +73,7 @@ static bool region_contains(struct pci_bus_region *region1, void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res, struct pci_bus_region *region) { - struct pci_host_bridge *bridge = find_pci_host_bridge(bus); + struct pci_host_bridge *bridge = pci_find_host_bridge(bus); struct resource_entry *window; resource_size_t offset = 0; diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 4091f82239cd..d72f849174a4 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -321,4 +321,6 @@ static inline int pci_dev_specific_reset(struct pci_dev *dev, int probe) } #endif +struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); + #endif /* DRIVERS_PCI_H */