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>
This commit is contained in:
Yijing Wang 2013-09-09 21:13:05 +08:00 committed by Bjorn Helgaas
parent 503275bf37
commit dcaa73dc34
1 changed files with 1 additions and 1 deletions

View File

@ -590,7 +590,7 @@ static int qib_tune_pcie_caps(struct qib_devdata *dd)
/* Find out supported and configured values for parent (root) */
parent = dd->pcidev->bus->self;
if (parent->bus->parent) {
if (!pci_is_root_bus(parent->bus)) {
qib_devinfo(dd->pcidev, "Parent not root\n");
goto bail;
}