diff options
author | Aaron Lu <aaron.lu@intel.com> | 2015-03-25 02:32:25 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-04-08 15:49:20 -0400 |
commit | 3390e0850b711d163b35508464cfbe0a4477dfe2 (patch) | |
tree | e9f0889f9af89418e62516a8de30a74d17a56901 /drivers/pci | |
parent | 18e94a3384368340d438cf67fcaebd72084f34f8 (diff) |
PCI: Export pci_find_host_bridge() for use inside PCI core
The find_pci_host_bridge() function can be useful to other PCI code so
export it. Change its name to pci_find_host_bridge().
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/host-bridge.c | 6 | ||||
-rw-r--r-- | 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 39b2dbe585aa..30211c617400 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) | |||
16 | return bus; | 16 | return bus; |
17 | } | 17 | } |
18 | 18 | ||
19 | static struct pci_host_bridge *find_pci_host_bridge(struct pci_bus *bus) | 19 | struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus) |
20 | { | 20 | { |
21 | struct pci_bus *root_bus = find_pci_root_bus(bus); | 21 | struct pci_bus *root_bus = find_pci_root_bus(bus); |
22 | 22 | ||
@@ -34,7 +34,7 @@ void pci_set_host_bridge_release(struct pci_host_bridge *bridge, | |||
34 | void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region, | 34 | void pcibios_resource_to_bus(struct pci_bus *bus, struct pci_bus_region *region, |
35 | struct resource *res) | 35 | struct resource *res) |
36 | { | 36 | { |
37 | struct pci_host_bridge *bridge = find_pci_host_bridge(bus); | 37 | struct pci_host_bridge *bridge = pci_find_host_bridge(bus); |
38 | struct resource_entry *window; | 38 | struct resource_entry *window; |
39 | resource_size_t offset = 0; | 39 | resource_size_t offset = 0; |
40 | 40 | ||
@@ -59,7 +59,7 @@ static bool region_contains(struct pci_bus_region *region1, | |||
59 | void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res, | 59 | void pcibios_bus_to_resource(struct pci_bus *bus, struct resource *res, |
60 | struct pci_bus_region *region) | 60 | struct pci_bus_region *region) |
61 | { | 61 | { |
62 | struct pci_host_bridge *bridge = find_pci_host_bridge(bus); | 62 | struct pci_host_bridge *bridge = pci_find_host_bridge(bus); |
63 | struct resource_entry *window; | 63 | struct resource_entry *window; |
64 | resource_size_t offset = 0; | 64 | resource_size_t offset = 0; |
65 | 65 | ||
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) | |||
321 | } | 321 | } |
322 | #endif | 322 | #endif |
323 | 323 | ||
324 | struct pci_host_bridge *pci_find_host_bridge(struct pci_bus *bus); | ||
325 | |||
324 | #endif /* DRIVERS_PCI_H */ | 326 | #endif /* DRIVERS_PCI_H */ |