diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2012-08-20 22:15:58 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 18:11:14 +0200 |
commit | 4460eb529231338e01a24a41b1432c0f3c38b089 (patch) | |
tree | ac56844927f025c8b3bb49d4e3ef8729c16b59ea /drivers/net | |
parent | ath9k: Use PCI Express Capability accessors (diff) | |
download | linux-4460eb529231338e01a24a41b1432c0f3c38b089.tar.xz linux-4460eb529231338e01a24a41b1432c0f3c38b089.zip |
iwlegacy: Use PCI Express Capability accessors
Use PCI Express Capability access functions to simplify iwlegacy 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')
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index 5f5017767b99..724682669060 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h @@ -1832,10 +1832,8 @@ int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd); static inline u16 il_pcie_link_ctl(struct il_priv *il) { - int pos; u16 pci_lnk_ctl; - pos = pci_pcie_cap(il->pci_dev); - pci_read_config_word(il->pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl); + pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &pci_lnk_ctl); return pci_lnk_ctl; } |