PM: domains: Allow to abort power off when no ->power_off() callback
authorUlf Hansson <ulf.hansson@linaro.org>
Thu, 24 Sep 2020 11:04:48 +0000 (13:04 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 2 Oct 2020 17:15:16 +0000 (19:15 +0200)
commitf63816e43d90442684cd2fd74f602cf3c5fae69c
tree2a3450e9b51602930b988d82ed2a5a1cfd30dcec
parent49f618e1b669ef0e26a8d8d7f8fafc7b8fd31531
PM: domains: Allow to abort power off when no ->power_off() callback

In genpd_power_off() we may decide to abort the power off of the PM domain,
even beyond the point when the governor would accept it. The abort is done
if it turns out that a child domain has been requested to be powered on,
which means it's waiting for the lock of the parent to be released.

However, the abort is currently only considered if the genpd in question
has a ->power_off() callback assigned. This is unnecessary limiting,
especially if the genpd would have a parent of its own. Let's remove the
limitation and make the behaviour consistent.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
[ rjw: Subject edit ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/domain.c