summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2011-06-27 07:45:44 (GMT)
committerDavid S. Miller <davem@davemloft.net>2011-06-28 04:40:45 (GMT)
commitd3aa0cb44f2cfcdfa6df1bd40b9c182b35528849 (patch)
tree3e84f0b3020091ee739cfe30bd8816f54990a8d4
parent77c98e6a7a3ab76340b315d31fe1edded17cba15 (diff)
downloadlinux-d3aa0cb44f2cfcdfa6df1bd40b9c182b35528849.tar.xz
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: Jon Mason <jdmason@kudzu.us> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/niu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 1c7b790..cd6c231 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -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;