summaryrefslogtreecommitdiffstats
path: root/drivers/pmdomain/core.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:18:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:18:06 +0000
commit638a9e433ecd61e64761352dbec1fa4f5874c941 (patch)
treefdbff74a238d7a5a7d1cef071b7230bc064b9f25 /drivers/pmdomain/core.c
parentReleasing progress-linux version 6.9.12-1~progress7.99u1. (diff)
downloadlinux-638a9e433ecd61e64761352dbec1fa4f5874c941.tar.xz
linux-638a9e433ecd61e64761352dbec1fa4f5874c941.zip
Merging upstream version 6.10.3.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/pmdomain/core.c')
-rw-r--r--drivers/pmdomain/core.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
index c40eda92a8..623d15b687 100644
--- a/drivers/pmdomain/core.c
+++ b/drivers/pmdomain/core.c
@@ -1188,8 +1188,12 @@ static void genpd_sync_power_off(struct generic_pm_domain *genpd, bool use_lock,
/* Choose the deepest state when suspending */
genpd->state_idx = genpd->state_count - 1;
- if (_genpd_power_off(genpd, false))
+ if (_genpd_power_off(genpd, false)) {
+ genpd->states[genpd->state_idx].rejected++;
return;
+ } else {
+ genpd->states[genpd->state_idx].usage++;
+ }
genpd->status = GENPD_STATE_OFF;
@@ -1261,10 +1265,7 @@ static int genpd_prepare(struct device *dev)
return -EINVAL;
genpd_lock(genpd);
-
- if (genpd->prepared_count++ == 0)
- genpd->suspended_count = 0;
-
+ genpd->prepared_count++;
genpd_unlock(genpd);
ret = pm_generic_prepare(dev);