Skip to content

Commit 5616ce7

Browse files
Shawn Guorafaeljw
authored andcommitted
PM: domains: Drop genpd status manipulation for hibernate restore
The genpd status manipulation for hibernate restore has really never worked as intended. For example, if the genpd->status was GENPD_STATE_ON, the parent domain's `sd_count` must have been increased, so it needs to be adjusted too. So drop this status manipulation. Suggested-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 30a0b95 commit 5616ce7

1 file changed

Lines changed: 0 additions & 13 deletions

File tree

drivers/base/power/domain.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,20 +1374,7 @@ static int genpd_restore_noirq(struct device *dev)
13741374
if (IS_ERR(genpd))
13751375
return -EINVAL;
13761376

1377-
/*
1378-
* At this point suspended_count == 0 means we are being run for the
1379-
* first time for the given domain in the present cycle.
1380-
*/
13811377
genpd_lock(genpd);
1382-
if (genpd->suspended_count++ == 0) {
1383-
/*
1384-
* The boot kernel might put the domain into arbitrary state,
1385-
* so make it appear as powered off to genpd_sync_power_on(),
1386-
* so that it tries to power it on in case it was really off.
1387-
*/
1388-
genpd->status = GENPD_STATE_OFF;
1389-
}
1390-
13911378
genpd_sync_power_on(genpd, true, 0);
13921379
genpd_unlock(genpd);
13931380

0 commit comments

Comments
 (0)