aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>2009-05-26 16:06:10 +0900
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-06-16 14:29:30 -0700
commit6e3f36df0ffa433e273c89f1447c94382a9db49e (patch)
tree47f29773dd108bd06d106aaabc7a097bd5373639
parenta222b8f83b995e9c6fe2aff2a8125facb49f658e (diff)
PCI: use pci_is_root_bus() in pci_find_upstream_pcie_bridge()
Use pci_is_root_bus() in pci_find_upstream_pcie_bridge() to check if the pci bus is root, for code consistency. Reviewed-by: Alex Chiang <achiang@hp.com> Reviewed-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
-rw-r--r--drivers/pci/search.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c
index 650bc0a538d..e8cb5051c31 100644
--- a/drivers/pci/search.c
+++ b/drivers/pci/search.c
@@ -29,7 +29,7 @@ pci_find_upstream_pcie_bridge(struct pci_dev *pdev)
if (pdev->is_pcie)
return NULL;
while (1) {
- if (!pdev->bus->parent)
+ if (pci_is_root_bus(pdev->bus))
break;
pdev = pdev->bus->self;
/* a p2p bridge */