]> git.neil.brown.name Git - history.git/commitdiff
[PATCH] APM: move 'ignore_normal_resume = 1'
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 12 Mar 2002 04:56:26 +0000 (20:56 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Tue, 12 Mar 2002 04:56:26 +0000 (20:56 -0800)
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.

arch/i386/kernel/apm.c

index a98677075d69b625f2f761121fd0a1386f895235..90dedc85d208b04c1e64a7a049719ccf04767ac8 100644 (file)
@@ -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) {