Commit 7efc9a0f authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

[PATCH] APM: move 'ignore_normal_resume = 1'

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.
parent 76949446
......@@ -1211,6 +1211,7 @@ static int suspend(int vetoable)
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;
......@@ -1219,7 +1220,6 @@ static int suspend(int vetoable)
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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment