PM / Domains: Remove in_progress counter from struct generic_pm_domain
Commit ba2bbfbf63
("PM / Domains: Remove intermediate states..") changed
the power off sequence (pm_genpd_poweroff()), which from locking point of
view means the genpd mutex is held throughout the sequence.
The above change means the in_progress counter can't be updated while
pm_genpd_poweroff() is executing, which allows us to remove the counter.
Instead we inform pm_genpd_poweroff() via a bool parameter, to indicate
whether we call it from the scheduled work or from the ->runtime_suspend()
callback, since that all that matters.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Lina Iyer <lina.iyer@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:

committed by
Rafael J. Wysocki

parent
1462206cbc
commit
f96b3c4f34
@@ -47,7 +47,6 @@ struct generic_pm_domain {
|
||||
struct dev_power_governor *gov;
|
||||
struct work_struct power_off_work;
|
||||
const char *name;
|
||||
unsigned int in_progress; /* Number of devices being suspended now */
|
||||
atomic_t sd_count; /* Number of subdomains with power "on" */
|
||||
enum gpd_status status; /* Current state of the domain */
|
||||
unsigned int device_count; /* Number of devices */
|
||||
|
Reference in New Issue
Block a user