mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
suspend: Return error when pending wakeup source is found.
Suspend is aborted if the wakeup_source is pending. These wakeup sources are checked multiple times before going to suspend. If it is found to be pending then suspend is aborted and -EBUSY is returned. This happens at all the places except the last time they are checked. In this case suspend is aborted but the error is not set. Since the error is not propogated the suspend accounting considers this as a sucessful suspend instead of suspend abort. Change-Id: Ib63b4ead755127eaf03e3b303aab3c782ad02ed1 Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
This commit is contained in:
parent
a50130f1be
commit
18bbd5eed4
1 changed files with 2 additions and 1 deletions
|
@ -184,10 +184,11 @@ static int suspend_enter(suspend_state_t state, bool *wakeup)
|
|||
if (!(suspend_test(TEST_CORE) || *wakeup)) {
|
||||
error = suspend_ops->enter(state);
|
||||
events_check_enabled = false;
|
||||
} else {
|
||||
} else if (*wakeup) {
|
||||
pm_get_active_wakeup_sources(suspend_abort,
|
||||
MAX_SUSPEND_ABORT_LEN);
|
||||
log_suspend_abort_reason(suspend_abort);
|
||||
error = -EBUSY;
|
||||
}
|
||||
|
||||
start_logging_wakeup_reasons();
|
||||
|
|
Loading…
Reference in a new issue