Skip to content

Commit 68dd49e

Browse files
jonmasonlinvjw
authored andcommitted
iwlwifi: 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> Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent 333c0db commit 68dd49e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/wireless/iwlwifi/iwl-pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ static u16 iwl_pciexp_link_ctrl(struct iwl_bus *bus)
9494
u16 pci_lnk_ctl;
9595
struct pci_dev *pci_dev = IWL_BUS_GET_PCI_DEV(bus);
9696

97-
pos = pci_find_capability(pci_dev, PCI_CAP_ID_EXP);
97+
pos = pci_pcie_cap(pci_dev);
9898
pci_read_config_word(pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl);
9999
return pci_lnk_ctl;
100100
}

0 commit comments

Comments
 (0)