summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mthca/mthca_reset.c
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2011-06-27 21:39:54 +0400
committerRoland Dreier <roland@purestorage.com>2011-07-18 23:01:22 +0400
commit9b89925c0d8f7d1cc203682df4fab847a7b4b7ec (patch)
tree893fd9d8e76a777a3c4cdfd2e89afdbea28b9a51 /drivers/infiniband/hw/mthca/mthca_reset.c
parentcdb73db0b6bf7a1bcf5c788f0c8f803facb6e517 (diff)
downloadlinux-9b89925c0d8f7d1cc203682df4fab847a7b4b7ec.tar.xz
IB/mthca: 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. Also, pci_is_pcie is a better way of determining if the device is PCIE or not (as it uses the same saved PCIE capability offset). Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_reset.c')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_reset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_reset.c b/drivers/infiniband/hw/mthca/mthca_reset.c
index 2a13a163d337..4fa3534ec233 100644
--- a/drivers/infiniband/hw/mthca/mthca_reset.c
+++ b/drivers/infiniband/hw/mthca/mthca_reset.c
@@ -113,7 +113,7 @@ int mthca_reset(struct mthca_dev *mdev)
}
hca_pcix_cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_PCIX);
- hca_pcie_cap = pci_find_capability(mdev->pdev, PCI_CAP_ID_EXP);
+ hca_pcie_cap = pci_pcie_cap(mdev->pdev);
if (bridge) {
bridge_header = kmalloc(256, GFP_KERNEL);