diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-12-05 15:51:20 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-12-07 13:19:24 -0500 |
commit | 94e1561344a7ef0e2aaed7c72050f8e4e82db1fe (patch) | |
tree | 24ff6bcf306b4062d9c809a1971d7a1d3a060fd4 /drivers/net/wireless/iwlegacy | |
parent | f2692bd9be3415ccfcb3a2d33b12ab6621c53067 (diff) |
iwlegacy: collapse wrapper for pcie_capability_read_word()
il_pcie_link_ctl() has only one call site and no longer provides any useful
abstraction, so collapse it into the caller.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy')
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.h | 8 |
2 files changed, 3 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index 318ed3c9fe74..181150760461 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -1183,8 +1183,9 @@ EXPORT_SYMBOL(il_power_update_mode); | |||
1183 | void | 1183 | void |
1184 | il_power_initialize(struct il_priv *il) | 1184 | il_power_initialize(struct il_priv *il) |
1185 | { | 1185 | { |
1186 | u16 lctl = il_pcie_link_ctl(il); | 1186 | u16 lctl; |
1187 | 1187 | ||
1188 | pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl); | ||
1188 | il->power_data.pci_pm = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN); | 1189 | il->power_data.pci_pm = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN); |
1189 | 1190 | ||
1190 | il->power_data.debug_sleep_level_override = -1; | 1191 | il->power_data.debug_sleep_level_override = -1; |
@@ -4233,7 +4234,7 @@ il_apm_init(struct il_priv *il) | |||
4233 | * power savings, even without L1. | 4234 | * power savings, even without L1. |
4234 | */ | 4235 | */ |
4235 | if (il->cfg->set_l0s) { | 4236 | if (il->cfg->set_l0s) { |
4236 | lctl = il_pcie_link_ctl(il); | 4237 | pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl); |
4237 | if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == | 4238 | if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == |
4238 | PCI_CFG_LINK_CTRL_VAL_L1_EN) { | 4239 | PCI_CFG_LINK_CTRL_VAL_L1_EN) { |
4239 | /* L1-ASPM enabled; disable(!) L0S */ | 4240 | /* L1-ASPM enabled; disable(!) L0S */ |
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index b4bb813362bd..c9a5022aaa36 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h | |||
@@ -1829,14 +1829,6 @@ int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd); | |||
1829 | * PCI * | 1829 | * PCI * |
1830 | *****************************************************/ | 1830 | *****************************************************/ |
1831 | 1831 | ||
1832 | static inline u16 | ||
1833 | il_pcie_link_ctl(struct il_priv *il) | ||
1834 | { | ||
1835 | u16 pci_lnk_ctl; | ||
1836 | pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &pci_lnk_ctl); | ||
1837 | return pci_lnk_ctl; | ||
1838 | } | ||
1839 | |||
1840 | void il_bg_watchdog(unsigned long data); | 1832 | void il_bg_watchdog(unsigned long data); |
1841 | u32 il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval); | 1833 | u32 il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval); |
1842 | __le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon, | 1834 | __le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon, |