diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c index 18951ed6295d..a86aeda1c955 100644 --- a/drivers/pmdomain/core.c +++ b/drivers/pmdomain/core.c @@ -1324,6 +1324,7 @@ static int genpd_runtime_resume(struct device *dev) return ret; } +#ifndef CONFIG_PM_GENERIC_DOMAINS_OF static bool pd_ignore_unused; static int __init pd_ignore_unused_setup(char *__unused) { @@ -1359,6 +1360,7 @@ static int __init genpd_power_off_unused(void) return 0; } late_initcall_sync(genpd_power_off_unused); +#endif #ifdef CONFIG_PM_SLEEP @@ -3459,6 +3461,7 @@ void of_genpd_sync_state(struct device_node *np) list_for_each_entry(genpd, &gpd_list, gpd_list_node) { if (genpd->provider == of_fwnode_handle(np)) { genpd_lock(genpd); + genpd->stay_on = false; genpd_power_off(genpd, false, 0); genpd_unlock(genpd); } @@ -3486,6 +3489,7 @@ static void genpd_provider_sync_state(struct device *dev) case GENPD_SYNC_STATE_SIMPLE: genpd_lock(genpd); + genpd->stay_on = false; genpd_power_off(genpd, false, 0); genpd_unlock(genpd); break;