diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2012-08-20 14:17:06 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 10:11:15 -0600 |
commit | a7238b37ce794d75b822865a389429ed007ca983 (patch) | |
tree | 9d8c2179c76c9747797f63fba0d25f99886e2312 | |
parent | 4460eb529231338e01a24a41b1432c0f3c38b089 (diff) |
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>
-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; } |