aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorYijing Wang <wangyijing@huawei.com>2013-09-09 09:13:05 -0400
committerBjorn Helgaas <bhelgaas@google.com>2013-09-24 14:13:03 -0400
commitdcaa73dc3411c4d771d1d6a950c6b8a9c71da089 (patch)
tree48fb325e8393b39f3add14583d42aa0a23e60a09 /drivers/infiniband
parent503275bf371fbab01a14f2e9fd1ac7aa20c81645 (diff)
IB/qib: Use pci_is_root_bus() to check whether it is a root bus
Use pci_is_root_bus() instead of "if (bus->parent)" statement for better readability. Signed-off-by: Yijing Wang <wangyijing@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/qib/qib_pcie.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/qib/qib_pcie.c b/drivers/infiniband/hw/qib/qib_pcie.c
index 3f14009fb662..45e55ff33dbf 100644
--- a/drivers/infiniband/hw/qib/qib_pcie.c
+++ b/drivers/infiniband/hw/qib/qib_pcie.c
@@ -590,7 +590,7 @@ static int qib_tune_pcie_caps(struct qib_devdata *dd)
590 590
591 /* Find out supported and configured values for parent (root) */ 591 /* Find out supported and configured values for parent (root) */
592 parent = dd->pcidev->bus->self; 592 parent = dd->pcidev->bus->self;
593 if (parent->bus->parent) { 593 if (!pci_is_root_bus(parent->bus)) {
594 qib_devinfo(dd->pcidev, "Parent not root\n"); 594 qib_devinfo(dd->pcidev, "Parent not root\n");
595 goto bail; 595 goto bail;
596 } 596 }