From: Jon Mason Date: Tue, 10 Jul 2012 21:57:55 +0000 (-0700) Subject: qla4xxx: remove unnecessary read of PCI_CAP_ID_EXP X-Git-Tag: v2.6.39-400.9.0~86 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=c1774aa6ad9f5191d115c7c88ea2289c78dfd36b;p=users%2Fjedix%2Flinux-maple.git qla4xxx: 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 Acked-by: Vikas Chaudhary Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/qla4xxx/ql4_nx.c b/drivers/scsi/qla4xxx/ql4_nx.c index f4116dc46c07..eb058bca585f 100644 --- a/drivers/scsi/qla4xxx/ql4_nx.c +++ b/drivers/scsi/qla4xxx/ql4_nx.c @@ -1609,7 +1609,7 @@ qla4_8xxx_start_firmware(struct scsi_qla_host *ha, uint32_t image_start) } /* Negotiated Link width */ - pcie_cap = pci_find_capability(ha->pdev, PCI_CAP_ID_EXP); + pcie_cap = pci_pcie_cap(ha->pdev); pci_read_config_word(ha->pdev, pcie_cap + PCI_EXP_LNKSTA, &lnk); ha->link_width = (lnk >> 4) & 0x3f;