提交 94e15613 编写于 作者: B Bjorn Helgaas

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: NBjorn Helgaas <bhelgaas@google.com>
Acked-by: NStanislaw Gruszka <sgruszka@redhat.com>
上级 f2692bd9
...@@ -1183,8 +1183,9 @@ EXPORT_SYMBOL(il_power_update_mode); ...@@ -1183,8 +1183,9 @@ EXPORT_SYMBOL(il_power_update_mode);
void void
il_power_initialize(struct il_priv *il) il_power_initialize(struct il_priv *il)
{ {
u16 lctl = il_pcie_link_ctl(il); u16 lctl;
pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl);
il->power_data.pci_pm = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN); il->power_data.pci_pm = !(lctl & PCI_CFG_LINK_CTRL_VAL_L0S_EN);
il->power_data.debug_sleep_level_override = -1; il->power_data.debug_sleep_level_override = -1;
...@@ -4233,7 +4234,7 @@ il_apm_init(struct il_priv *il) ...@@ -4233,7 +4234,7 @@ il_apm_init(struct il_priv *il)
* power savings, even without L1. * power savings, even without L1.
*/ */
if (il->cfg->set_l0s) { if (il->cfg->set_l0s) {
lctl = il_pcie_link_ctl(il); pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &lctl);
if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) == if ((lctl & PCI_CFG_LINK_CTRL_VAL_L1_EN) ==
PCI_CFG_LINK_CTRL_VAL_L1_EN) { PCI_CFG_LINK_CTRL_VAL_L1_EN) {
/* L1-ASPM enabled; disable(!) L0S */ /* L1-ASPM enabled; disable(!) L0S */
......
...@@ -1829,14 +1829,6 @@ int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd); ...@@ -1829,14 +1829,6 @@ int il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd);
* PCI * * PCI *
*****************************************************/ *****************************************************/
static inline u16
il_pcie_link_ctl(struct il_priv *il)
{
u16 pci_lnk_ctl;
pcie_capability_read_word(il->pci_dev, PCI_EXP_LNKCTL, &pci_lnk_ctl);
return pci_lnk_ctl;
}
void il_bg_watchdog(unsigned long data); void il_bg_watchdog(unsigned long data);
u32 il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval); u32 il_usecs_to_beacons(struct il_priv *il, u32 usec, u32 beacon_interval);
__le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon, __le32 il_add_beacon_time(struct il_priv *il, u32 base, u32 addon,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册