summaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2011-06-27 09:42:17 +0200
committerDavid S. Miller <davem@davemloft.net>2011-06-28 06:40:44 +0200
commita875a4c7404c8e259236b650136b8a603923daf9 (patch)
tree1ca7c9447235ed4124fbd1a0789ea771d7d08d78 /drivers/net/mlx4
parenttg3: remove unnecessary read of PCI_CAP_ID_EXP (diff)
downloadlinux-a875a4c7404c8e259236b650136b8a603923daf9.tar.xz
linux-a875a4c7404c8e259236b650136b8a603923daf9.zip
mlx4: 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>
Diffstat (limited to '')
-rw-r--r--drivers/net/mlx4/reset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/mlx4/reset.c b/drivers/net/mlx4/reset.c
index e5741dab3825..11e7c1cb99bf 100644
--- a/drivers/net/mlx4/reset.c
+++ b/drivers/net/mlx4/reset.c
@@ -77,7 +77,7 @@ int mlx4_reset(struct mlx4_dev *dev)
goto out;
}
- pcie_cap = pci_find_capability(dev->pdev, PCI_CAP_ID_EXP);
+ pcie_cap = pci_pcie_cap(dev->pdev);
for (i = 0; i < 64; ++i) {
if (i == 22 || i == 23)