diff options
author | Todd Poynor <toddpoynor@google.com> | 2011-10-09 02:31:49 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-10-09 02:31:49 +0100 |
commit | 92a30bccba48f12629becfd1c80ce2907df6806a (patch) | |
tree | 2413fce144d2d3c64e75a020c31c90f1e13c0f0c /kernel | |
parent | efdeeff1c5e655158a4a8238e52bc74932b46944 (diff) |
PM: wakelocks: Don't report wake up wakelock if suspend aborted
If the wakelock driver aborts suspend due to an already-held
wakelock, don't report the next wakelock held as the "wake up
wakelock".
Change-Id: I582ffbb87a3c361739a77d839a0c62921cff11a6
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/wakelock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/wakelock.c b/kernel/power/wakelock.c index c10d0ee7907..d45df2b151b 100644 --- a/kernel/power/wakelock.c +++ b/kernel/power/wakelock.c @@ -311,7 +311,7 @@ static int power_suspend_late(struct device *dev) { int ret = has_wake_lock(WAKE_LOCK_SUSPEND) ? -EAGAIN : 0; #ifdef CONFIG_WAKELOCK_STAT - wait_for_wakeup = 1; + wait_for_wakeup = !ret; #endif if (debug_mask & DEBUG_SUSPEND) pr_info("power_suspend_late return %d\n", ret); |