The resuming notify should be broadcasted after completely finishing
wakeup transition. In other words, broadcasting should be held when a
transition is waiting for being confirmed by user program. In this
context, it is proper to relocate device_notify() to resume_echo_mem(),
which is invoked on finishing wakeup transition.
Change-Id: I0c924d5667b749f79e95f04b62c69e499ffb7058
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
// resume
update_wakeup_reason();
- device_notify(DEVICE_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM, NULL);
/*
* FIXME: If the wakeup reason lingers after wakeup, a transition triggered from other
* than the above line would take the lingering wakeup reason as a transition reason,
static void resume_echo_mem(void)
{
- // nothing to do
+ device_notify(DEVICE_NOTIFIER_POWER_RESUME_FROM_ECHO_MEM, NULL);
}
static void suspend_autosleep(void)
static void pre_action_normal(void *udata)
{
- power_resume(transition_context.ti.reason);
+ if (transition_context.ti.curr == DEVICED_POWER_STATE_SLEEP)
+ power_resume(transition_context.ti.reason);
}
static void post_action_sleep(void *udata)