Skip to content

Commit

Permalink
iwlegacy: remove unnecessary read of PCI_CAP_ID_EXP
Browse files Browse the repository at this point in the history
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: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Jon Mason authored and John W. Linville committed Jun 29, 2011
1 parent bfc8dfe commit f05b691
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlegacy/iwl-core.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ static inline u16 iwl_legacy_pcie_link_ctl(struct iwl_priv *priv)
{
int pos;
u16 pci_lnk_ctl;
pos = pci_find_capability(priv->pci_dev, PCI_CAP_ID_EXP);
pos = pci_pcie_cap(priv->pci_dev);
pci_read_config_word(priv->pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl);
return pci_lnk_ctl;
}
Expand Down

0 comments on commit f05b691

Please sign in to comment.