Skip to content

Commit 34be275

Browse files
Ulf Hanssonrafaeljw
authored andcommitted
cpuidle: psci: Fix regression leading to no genpd governor
While factoring out the PM domain related code from PSCI domain driver into a set of library functions, a regression when initializing the genpds got introduced. More precisely, we fail to assign a genpd governor, so let's fix this. Fixes: 9d976d6 ("cpuidle: Factor-out power domain related code from PSCI domain driver") Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent d1cf8bb commit 34be275

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/cpuidle/cpuidle-psci-domain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static int psci_pd_init(struct device_node *np, bool use_osi)
5252
struct generic_pm_domain *pd;
5353
struct psci_pd_provider *pd_provider;
5454
struct dev_power_governor *pd_gov;
55-
int ret = -ENOMEM, state_count = 0;
55+
int ret = -ENOMEM;
5656

5757
pd = dt_idle_pd_alloc(np, psci_dt_parse_state_node);
5858
if (!pd)
@@ -71,7 +71,7 @@ static int psci_pd_init(struct device_node *np, bool use_osi)
7171
pd->flags |= GENPD_FLAG_ALWAYS_ON;
7272

7373
/* Use governor for CPU PM domains if it has some states to manage. */
74-
pd_gov = state_count > 0 ? &pm_domain_cpu_gov : NULL;
74+
pd_gov = pd->states ? &pm_domain_cpu_gov : NULL;
7575

7676
ret = pm_genpd_init(pd, pd_gov, false);
7777
if (ret)

0 commit comments

Comments
 (0)