diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2012-08-20 16:15:58 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-08-23 12:11:14 -0400 |
commit | 4460eb529231338e01a24a41b1432c0f3c38b089 (patch) | |
tree | ac56844927f025c8b3bb49d4e3ef8729c16b59ea /drivers/net/wireless/iwlegacy/common.h | |
parent | 08bd108096b6bc7d830b62e0b468179e5e3d0b89 (diff) |
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/common.h')
-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); | |||
1832 | static inline u16 | 1832 | static inline u16 |
1833 | il_pcie_link_ctl(struct il_priv *il) | 1833 | il_pcie_link_ctl(struct il_priv *il) |
1834 | { | 1834 | { |
1835 | int pos; | ||
1836 | u16 pci_lnk_ctl; | 1835 | u16 pci_lnk_ctl; |
1837 | pos = pci_pcie_cap(il->pci_dev); | 1836 | pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &pci_lnk_ctl); |
1838 | pci_read_config_word(il->pci_dev, pos + PCI_EXP_LNKCTL, &pci_lnk_ctl); | ||
1839 | return pci_lnk_ctl; | 1837 | return pci_lnk_ctl; |
1840 | } | 1838 | } |
1841 | 1839 | ||