[PATCH] apm.c: ignore_normal_resume is set a bit too late

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2005-06-13 at 22:20 +1000, Stephen Rothwell wrote:
> I am not using APM any more and have no way to test such a change.  So,
> can you please do a proper patch with comment and Signed-off-by line and
> send it to Andrew Morton ([email protected]) (and cc lkml, I guess).  When I
> see it, I will Ack it to Andrew.


Summary: apm: Prevent double APM resume on Thinkpad X31

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 <[email protected]>

-- 
Thomas Hood <[email protected]>
--- kernel-source-2.6.11/arch/i386/kernel/apm.c_ORIG	2005-03-02 08:37:47.000000000 +0100
+++ kernel-source-2.6.11/arch/i386/kernel/apm.c	2005-06-13 14:59:51.000000000 +0200
@@ -1220,13 +1220,13 @@ static int suspend(int vetoable)
 
 	save_processor_state();
 	err = set_system_power_state(APM_STATE_SUSPEND);
+	ignore_normal_resume = 1;
 	restore_processor_state();
 
 	write_seqlock_irq(&xtime_lock);
 	spin_lock(&i8253_lock);
 	reinit_timer();
 	set_time();
-	ignore_normal_resume = 1;
 
 	spin_unlock(&i8253_lock);
 	write_sequnlock_irq(&xtime_lock);

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux