PM / Domains: Remove in_progress counter from struct generic_pm_domain
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 29 Sep 2015 13:12:37 +0000 (15:12 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 12 Oct 2015 21:19:55 +0000 (23:19 +0200)
commitf96b3c4f34b294a2293a5aa1d55e12e66aee055d
tree8d47b988d288d30c437d1ff7ca9ffdcfef2aa042
parent1462206cbccebf2b61e05cf786d458afe49d5509
PM / Domains: Remove in_progress counter from struct generic_pm_domain

Commit ba2bbfbf6307 ("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>
drivers/base/power/domain.c
include/linux/pm_domain.h