Merge tag 'for-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
[linux-3.10.git] / drivers / net / wireless / iwlwifi / pcie / trans.c
index dbeebef..063ecaf 100644 (file)
@@ -675,13 +675,10 @@ static void iwl_set_pwr_vmain(struct iwl_trans *trans)
 static u16 iwl_pciexp_link_ctrl(struct iwl_trans *trans)
 {
        struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
-       int pos;
        u16 pci_lnk_ctl;
 
-       struct pci_dev *pci_dev = trans_pcie->pci_dev;
-
-       pos = pci_pcie_cap(pci_dev);
-       pci_read_config_word(pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl);
+       pcie_capability_read_word(trans_pcie->pci_dev, PCI_EXP_LNKCTL,
+                                 &pci_lnk_ctl);
        return pci_lnk_ctl;
 }