This is number four and actually fixes a bug.
This patch moves the setting of the ignore_normal_resume flag
prior to the sti(); otherwise BIOS-generated normal resume
events slip through unignored.
err = apm_set_power_state(APM_STATE_SUSPEND);
reinit_timer();
set_time();
+ ignore_normal_resume = 1;
sti();
if (err == APM_NO_ERROR)
err = APM_SUCCESS;
err = (err == APM_SUCCESS) ? 0 : -EIO;
pm_send_all(PM_RESUME, (void *)0);
queue_event(APM_NORMAL_RESUME, NULL);
- ignore_normal_resume = 1;
out:
spin_lock(&user_list_lock);
for (as = user_list; as != NULL; as = as->next) {