diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2014-09-22 16:46:13 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-09-22 16:46:13 -0400 |
commit | bee3f304435a9c8c70b135083e23516872a17c98 (patch) | |
tree | 306d0fd6a05cfa69e4cb409d07030f6aff876f62 /drivers/pci/search.c | |
parent | be63497c413e22d5abdf32313f4b469af6aa7f4c (diff) |
PCI: Remove unused pci_find_upstream_pcie_bridge()
pci_find_upstream_pcie_bridge() is unused, so remove it.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/search.c')
-rw-r--r-- | drivers/pci/search.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 827ad831f1dd..a81f413083e4 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -103,40 +103,6 @@ int pci_for_each_dma_alias(struct pci_dev *pdev, | |||
103 | return ret; | 103 | return ret; |
104 | } | 104 | } |
105 | 105 | ||
106 | /* | ||
107 | * find the upstream PCIe-to-PCI bridge of a PCI device | ||
108 | * if the device is PCIE, return NULL | ||
109 | * if the device isn't connected to a PCIe bridge (that is its parent is a | ||
110 | * legacy PCI bridge and the bridge is directly connected to bus 0), return its | ||
111 | * parent | ||
112 | */ | ||
113 | struct pci_dev *pci_find_upstream_pcie_bridge(struct pci_dev *pdev) | ||
114 | { | ||
115 | struct pci_dev *tmp = NULL; | ||
116 | |||
117 | if (pci_is_pcie(pdev)) | ||
118 | return NULL; | ||
119 | while (1) { | ||
120 | if (pci_is_root_bus(pdev->bus)) | ||
121 | break; | ||
122 | pdev = pdev->bus->self; | ||
123 | /* a p2p bridge */ | ||
124 | if (!pci_is_pcie(pdev)) { | ||
125 | tmp = pdev; | ||
126 | continue; | ||
127 | } | ||
128 | /* PCI device should connect to a PCIe bridge */ | ||
129 | if (pci_pcie_type(pdev) != PCI_EXP_TYPE_PCI_BRIDGE) { | ||
130 | /* Busted hardware? */ | ||
131 | WARN_ON_ONCE(1); | ||
132 | return NULL; | ||
133 | } | ||
134 | return pdev; | ||
135 | } | ||
136 | |||
137 | return tmp; | ||
138 | } | ||
139 | |||
140 | static struct pci_bus *pci_do_find_bus(struct pci_bus *bus, unsigned char busnr) | 106 | static struct pci_bus *pci_do_find_bus(struct pci_bus *bus, unsigned char busnr) |
141 | { | 107 | { |
142 | struct pci_bus *child; | 108 | struct pci_bus *child; |