summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/pci.c
diff options
context:
space:
mode:
authorJon Mason <jdmason@kudzu.us>2011-06-27 12:50:14 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-06-29 15:10:59 -0400
commit6a4ecc29c90c322e28941e6dec406b08b5e1f0ea (patch)
tree121e11bbaf89ecc06c44cc34f1f681a828e97ff1 /drivers/net/wireless/rtlwifi/pci.c
parentf05b691150af4cfccbfba6cc708b9a58b9216903 (diff)
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>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/pci.c')
-rw-r--r--drivers/net/wireless/rtlwifi/pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 6a15f368ebb..aa0ba9ec6aa 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -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;