summaryrefslogtreecommitdiffstats
path: root/drivers/pci/search.c
diff options
context:
space:
mode:
authorKenji Kaneshige2009-05-26 09:06:10 +0200
committerJesse Barnes2009-06-16 23:29:30 +0200
commit6e3f36df0ffa433e273c89f1447c94382a9db49e (patch)
tree47f29773dd108bd06d106aaabc7a097bd5373639 /drivers/pci/search.c
parentPCI: use pci_is_root_bus() in acpi_find_root_bridge_handle() (diff)
downloadkernel-qcow2-linux-6e3f36df0ffa433e273c89f1447c94382a9db49e.tar.gz
kernel-qcow2-linux-6e3f36df0ffa433e273c89f1447c94382a9db49e.tar.xz
kernel-qcow2-linux-6e3f36df0ffa433e273c89f1447c94382a9db49e.zip
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>
Diffstat (limited to 'drivers/pci/search.c')
-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 650bc0a538dc..e8cb5051c311 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 */