[PATCH] apm.c: ignore_normal_resume is set a bit too late
authorThomas Hood <jdthood@aglu.demon.nl>
Tue, 14 Jun 2005 05:58:04 +0000 (22:58 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 14 Jun 2005 14:19:35 +0000 (07:19 -0700)
This patch causes the ignore_normal_resume flag to be set slightly earlier,
before there is a chance that the apm driver will receive the normal resume
event from the BIOS.  (Addresses Debian bug #310865)

Signed-off-by: Thomas Hood <jdthood@yahoo.co.uk>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/apm.c

index 45641a87255009968c6882b4d04fcd4dbf52df90..0ff65abcd56c3c1139b4849a80228f555785c655 100644 (file)
@@ -1222,6 +1222,7 @@ static int suspend(int vetoable)
 
        save_processor_state();
        err = set_system_power_state(APM_STATE_SUSPEND);
+       ignore_normal_resume = 1;
        restore_processor_state();
 
        local_irq_disable();
@@ -1229,7 +1230,6 @@ static int suspend(int vetoable)
        spin_lock(&i8253_lock);
        reinit_timer();
        set_time();
-       ignore_normal_resume = 1;
 
        spin_unlock(&i8253_lock);
        write_sequnlock(&xtime_lock);