]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5e4318da4aa2399db2a563b20a4d57d84be3c6b4
tree8d47b988d288d30c437d1ff7ca9ffdcfef2aa042
parente83a566e935d6e99b93e505f0de5d8dfe3d6cd9f
PM / Domains: Remove in_progress counter from struct generic_pm_domain

Commit d2af4edb0832 ("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