Commit 697a7f37 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

PM / Domains: Do not restore all devices on power off error

Since every device in a PM domain has its own need_restore
flag, which is set by __pm_genpd_save_device(), there's no need to
walk the domain's device list and restore all devices on an error
from one of the drivers' .runtime_suspend() callbacks.
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent c6d22b37
...@@ -269,8 +269,10 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd) ...@@ -269,8 +269,10 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
list_for_each_entry_reverse(dle, &genpd->dev_list, node) { list_for_each_entry_reverse(dle, &genpd->dev_list, node) {
ret = __pm_genpd_save_device(dle, genpd); ret = __pm_genpd_save_device(dle, genpd);
if (ret) if (ret) {
goto err_dev; genpd_set_active(genpd);
goto out;
}
if (genpd_abort_poweroff(genpd)) if (genpd_abort_poweroff(genpd))
goto out; goto out;
...@@ -311,13 +313,6 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd) ...@@ -311,13 +313,6 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd)
genpd->poweroff_task = NULL; genpd->poweroff_task = NULL;
wake_up_all(&genpd->status_wait_queue); wake_up_all(&genpd->status_wait_queue);
return ret; return ret;
err_dev:
list_for_each_entry_continue(dle, &genpd->dev_list, node)
__pm_genpd_restore_device(dle, genpd);
genpd_set_active(genpd);
goto out;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment