aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-05 19:08:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-05 19:08:12 -0400
commit5aebc7d2780df9176ee92f6d3bfd54b04457e349 (patch)
treed96dc34f039663c80c325cd97ecf3cd2fb9ddd66 /drivers
parent31d099085d5415a073b52358a5fc61d50e9ab614 (diff)
parent69e445ab8b66a9f30519842ef18be555d3ee9b51 (diff)
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/power/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 3f68e2919dc5..a690fd400260 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -1713,8 +1713,10 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async)
1713 1713
1714 dpm_wait_for_subordinate(dev, async); 1714 dpm_wait_for_subordinate(dev, async);
1715 1715
1716 if (async_error) 1716 if (async_error) {
1717 dev->power.direct_complete = false;
1717 goto Complete; 1718 goto Complete;
1719 }
1718 1720
1719 /* 1721 /*
1720 * If a device configured to wake up the system from sleep states 1722 * 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)
1726 pm_wakeup_event(dev, 0); 1728 pm_wakeup_event(dev, 0);
1727 1729
1728 if (pm_wakeup_pending()) { 1730 if (pm_wakeup_pending()) {
1731 dev->power.direct_complete = false;
1729 async_error = -EBUSY; 1732 async_error = -EBUSY;
1730 goto Complete; 1733 goto Complete;
1731 } 1734 }