Commit d3aa0cb4 authored by Jon Mason's avatar Jon Mason Committed by David S. Miller

niu: remove unnecessary read of PCI_CAP_ID_EXP

The PCIE capability offset is saved during PCI bus walking.  It will
remove an unnecessary search in the PCI configuration space if this
value is referenced instead of reacquiring it.
Signed-off-by: default avatarJon Mason <jdmason@kudzu.us>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 77c98e6a
......@@ -9797,7 +9797,7 @@ static int __devinit niu_pci_init_one(struct pci_dev *pdev,
goto err_out_disable_pdev;
}
pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
pos = pci_pcie_cap(pdev);
if (pos <= 0) {
dev_err(&pdev->dev, "Cannot find PCI Express capability, aborting\n");
goto err_out_free_res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment