aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/host-bridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/host-bridge.c')
-rw-r--r--drivers/pci/host-bridge.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/pci/host-bridge.c b/drivers/pci/host-bridge.c
index c49a1c482cfb..122df80592c3 100644
--- a/drivers/pci/host-bridge.c
+++ b/drivers/pci/host-bridge.c
@@ -9,13 +9,6 @@
9 9
10#include "pci.h" 10#include "pci.h"
11 11
12static LIST_HEAD(pci_host_bridges);
13
14void add_to_pci_host_bridges(struct pci_host_bridge *bridge)
15{
16 list_add_tail(&bridge->list, &pci_host_bridges);
17}
18
19static struct pci_bus *find_pci_root_bus(struct pci_dev *dev) 12static struct pci_bus *find_pci_root_bus(struct pci_dev *dev)
20{ 13{
21 struct pci_bus *bus; 14 struct pci_bus *bus;
@@ -30,14 +23,8 @@ static struct pci_bus *find_pci_root_bus(struct pci_dev *dev)
30static struct pci_host_bridge *find_pci_host_bridge(struct pci_dev *dev) 23static struct pci_host_bridge *find_pci_host_bridge(struct pci_dev *dev)
31{ 24{
32 struct pci_bus *bus = find_pci_root_bus(dev); 25 struct pci_bus *bus = find_pci_root_bus(dev);
33 struct pci_host_bridge *bridge;
34
35 list_for_each_entry(bridge, &pci_host_bridges, list) {
36 if (bridge->bus == bus)
37 return bridge;
38 }
39 26
40 return NULL; 27 return to_pci_host_bridge(bus->bridge);
41} 28}
42 29
43static bool resource_contains(struct resource *res1, struct resource *res2) 30static bool resource_contains(struct resource *res1, struct resource *res2)