Message ID | 20181003143824.13059-3-ulf.hansson@linaro.org |
---|---|
State | Accepted |
Commit | 2c9b7f8772033cc8bafbd4eefe2ca605bf3eb094 |
Headers | show |
Series | PM / Domains: Support hierarchical CPU arrangement (PSCI/ARM) (a subset) | expand |
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index e1bbddb02871..7f38a92b444a 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -467,6 +467,10 @@ static int genpd_power_off(struct generic_pm_domain *genpd, bool one_dev_on, return -EAGAIN; } + /* Default to shallowest state. */ + if (!genpd->gov) + genpd->state_idx = 0; + if (genpd->power_off) { int ret; @@ -1687,6 +1691,8 @@ int pm_genpd_init(struct generic_pm_domain *genpd, ret = genpd_set_default_power_state(genpd); if (ret) return ret; + } else if (!gov) { + pr_warn("%s : no governor for states\n", genpd->name); } device_initialize(&genpd->dev);