diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2012-08-20 22:17:06 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 18:11:15 +0200 |
commit | a7238b37ce794d75b822865a389429ed007ca983 (patch) | |
tree | 9d8c2179c76c9747797f63fba0d25f99886e2312 /drivers/net/wireless/iwlwifi | |
parent | iwlegacy: Use PCI Express Capability accessors (diff) | |
download | linux-a7238b37ce794d75b822865a389429ed007ca983.tar.xz linux-a7238b37ce794d75b822865a389429ed007ca983.zip |
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>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 939c2f78df58..26bdbe3ff7cf 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c @@ -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; } |