mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 21:14:56 -04:00
Merge branch 'pci/aspm'
- Change aspm_disabled and aspm_force from int to bool (Hans Zhang) - Initialize val at declaration (Hans Zhang) * pci/aspm: PCI/ASPM: Consolidate variable declaration and initialization PCI/ASPM: Use boolean type for aspm_disabled and aspm_force
This commit is contained in:
@@ -245,7 +245,7 @@ struct pcie_link_state {
|
||||
u32 clkpm_disable:1; /* Clock PM disabled */
|
||||
};
|
||||
|
||||
static int aspm_disabled, aspm_force;
|
||||
static bool aspm_disabled, aspm_force;
|
||||
static bool aspm_support_enabled = true;
|
||||
static DEFINE_MUTEX(aspm_lock);
|
||||
static LIST_HEAD(link_list);
|
||||
@@ -884,10 +884,9 @@ static void pcie_aspm_cap_init(struct pcie_link_state *link, int blacklist)
|
||||
/* Configure the ASPM L1 substates. Caller must disable L1 first. */
|
||||
static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state)
|
||||
{
|
||||
u32 val;
|
||||
u32 val = 0;
|
||||
struct pci_dev *child = link->downstream, *parent = link->pdev;
|
||||
|
||||
val = 0;
|
||||
if (state & PCIE_LINK_STATE_L1_1)
|
||||
val |= PCI_L1SS_CTL1_ASPM_L1_1;
|
||||
if (state & PCIE_LINK_STATE_L1_2)
|
||||
@@ -1712,11 +1711,11 @@ static int __init pcie_aspm_disable(char *str)
|
||||
{
|
||||
if (!strcmp(str, "off")) {
|
||||
aspm_policy = POLICY_DEFAULT;
|
||||
aspm_disabled = 1;
|
||||
aspm_disabled = true;
|
||||
aspm_support_enabled = false;
|
||||
pr_info("PCIe ASPM is disabled\n");
|
||||
} else if (!strcmp(str, "force")) {
|
||||
aspm_force = 1;
|
||||
aspm_force = true;
|
||||
pr_info("PCIe ASPM is forcibly enabled\n");
|
||||
}
|
||||
return 1;
|
||||
@@ -1734,7 +1733,7 @@ void pcie_no_aspm(void)
|
||||
*/
|
||||
if (!aspm_force) {
|
||||
aspm_policy = POLICY_DEFAULT;
|
||||
aspm_disabled = 1;
|
||||
aspm_disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user