rtlwifi: 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, remove unnecessary and unused #defines for PCI. Signed-off-by: Jon Mason <jdmason@kudzu.us> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
f05b691150
commit
6a4ecc29c9
@@ -390,7 +390,7 @@ static void rtl_pci_parse_configuration(struct pci_dev *pdev,
|
||||
u8 linkctrl_reg;
|
||||
|
||||
/*Link Control Register */
|
||||
pos = pci_find_capability(pdev, PCI_CAP_ID_EXP);
|
||||
pos = pci_pcie_cap(pdev);
|
||||
pci_read_config_byte(pdev, pos + PCI_EXP_LNKCTL, &linkctrl_reg);
|
||||
pcipriv->ndis_adapter.linkctrl_reg = linkctrl_reg;
|
||||
|
||||
|
Reference in New Issue
Block a user