diff options
| author | Dan Willemsen <dwillemsen@nvidia.com> | 2012-09-07 23:07:53 -0700 |
|---|---|---|
| committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 12:09:20 -0700 |
| commit | 9f1ab7af88fe9858c3c90eef44b0cc62b98c264e (patch) | |
| tree | bfd65d9b25ef6054d37d073bc9f545bdda17ab79 /drivers/base | |
| parent | 794fa47369dbc7670cef5dc6c3d9057ccc0797a6 (diff) | |
unknown changes from android-tegra-nv-3.4
Rebase-Id: R940fad74c7e91ef3d1d3d589a48064ccb7335541
Diffstat (limited to 'drivers/base')
| -rw-r--r-- | drivers/base/power/wakeup.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/base/power/wakeup.c b/drivers/base/power/wakeup.c index 79715e7fa43e..f3ceabe0c0b2 100644 --- a/drivers/base/power/wakeup.c +++ b/drivers/base/power/wakeup.c @@ -696,14 +696,22 @@ bool pm_wakeup_pending(void) { unsigned long flags; bool ret = false; + unsigned int cnt, inpr; + /** + * HACK: return true if event is in progress even though + * check is not enabled. This causes suspend to abort + * if wake_lock is acquired before starting suspend + * process and user has not enabled check. This HACK is for + * android wake locks to work. + */ spin_lock_irqsave(&events_lock, flags); + split_counters(&cnt, &inpr); if (events_check_enabled) { - unsigned int cnt, inpr; - - split_counters(&cnt, &inpr); ret = (cnt != saved_count || inpr > 0); events_check_enabled = !ret; + } else if (inpr > 0) { + ret = true; } spin_unlock_irqrestore(&events_lock, flags); |
