diff options
author | Todd Poynor <toddpoynor@google.com> | 2011-10-25 11:40:47 +0800 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-10-25 11:40:47 +0800 |
commit | 72598ff36e887d574f7bbfab5a66133da0750f00 (patch) | |
tree | 75b8ce4c48c5fe0258c45fac6077cf7315f82b91 /kernel | |
parent | 0e7ce4dfae2300f40f32c42142c9ad50831f76cc (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); |