iwlwifi: Use PCI Express Capability accessors
Use PCI Express Capability access functions to simplify iwlwifi driver. [bhelgaas: split iwlegacy, iwlwifi, rtlwifi into separate patches] Signed-off-by: Jiang Liu <jiang.liu@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
4460eb5292
commit
a7238b37ce
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user