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:
parent
503275bf37
commit
dcaa73dc34
|
@ -590,7 +590,7 @@ static int qib_tune_pcie_caps(struct qib_devdata *dd)
|
||||||
|
|
||||||
/* Find out supported and configured values for parent (root) */
|
/* Find out supported and configured values for parent (root) */
|
||||||
parent = dd->pcidev->bus->self;
|
parent = dd->pcidev->bus->self;
|
||||||
if (parent->bus->parent) {
|
if (!pci_is_root_bus(parent->bus)) {
|
||||||
qib_devinfo(dd->pcidev, "Parent not root\n");
|
qib_devinfo(dd->pcidev, "Parent not root\n");
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue