diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2012-08-20 14:15:58 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 10:11:14 -0600 |
commit | 4460eb529231338e01a24a41b1432c0f3c38b089 (patch) | |
tree | ac56844927f025c8b3bb49d4e3ef8729c16b59ea /drivers/net/wireless/iwlegacy | |
parent | 08bd108096b6bc7d830b62e0b468179e5e3d0b89 (diff) | |
download | op-kernel-dev-4460eb529231338e01a24a41b1432c0f3c38b089.zip op-kernel-dev-4460eb529231338e01a24a41b1432c0f3c38b089.tar.gz |
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/wireless/iwlegacy')
-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 5f50177..7246826 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; } |