/* Return a PM message representing the resume event corresponding to given sleep state.  */
static pm_message_t resume_event(pm_message_t sleep_state)
/* Return a PM message representing the resume event corresponding to given sleep state.  */
static pm_message_t resume_event(pm_message_t sleep_state)
{
	switch (sleep_state.event) {
	case PM_EVENT_SUSPEND:
		return PMSG_RESUME;
	case PM_EVENT_FREEZE:
	case PM_EVENT_QUIESCE:
		return PMSG_RECOVER;
	case PM_EVENT_HIBERNATE:
		return PMSG_RESTORE;
	}
	return PMSG_ON;
}