Skip to content

Commit 5aebc7d

Browse files
committed
Merge tag 'pm-4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Rafael writes: "Power management fix for 4.19-rc7 Fix a bug that may cause runtime PM to misbehave for some devices after a failing or aborted system suspend which is nasty enough for an -rc7 time frame fix." * tag 'pm-4.19-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: PM / core: Clear the direct_complete flag on errors
2 parents 31d0990 + 69e445a commit 5aebc7d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/base/power/main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1713,8 +1713,10 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
17131713

17141714
dpm_wait_for_subordinate(dev, async);
17151715

1716-
if (async_error)
1716+
if (async_error) {
1717+
dev->power.direct_complete = false;
17171718
goto Complete;
1719+
}
17181720

17191721
/*
17201722
* If a device configured to wake up the system from sleep states
@@ -1726,6 +1728,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
17261728
pm_wakeup_event(dev, 0);
17271729

17281730
if (pm_wakeup_pending()) {
1731+
dev->power.direct_complete = false;
17291732
async_error = -EBUSY;
17301733
goto Complete;
17311734
}

0 commit comments

Comments
 (0)