]> code.ossystems Code Review - openembedded-core.git/commitdiff
linux-openmoko: Break immediate suspend on resume cycle
authorRichard Purdie <richard@openedhand.com>
Thu, 21 Feb 2008 00:58:17 +0000 (00:58 +0000)
committerRichard Purdie <richard@openedhand.com>
Thu, 21 Feb 2008 00:58:17 +0000 (00:58 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3839 311d38ba-8fff-0310-9ca6-ca027cbcb966

meta/packages/linux/linux-openmoko/break_suspend_cycle.patch [new file with mode: 0644]
meta/packages/linux/linux-openmoko_2.6.22.5.bb

diff --git a/meta/packages/linux/linux-openmoko/break_suspend_cycle.patch b/meta/packages/linux/linux-openmoko/break_suspend_cycle.patch
new file mode 100644 (file)
index 0000000..2a72148
--- /dev/null
@@ -0,0 +1,34 @@
+Index: linux-2.6.21/drivers/char/apm-emulation.c
+===================================================================
+--- linux-2.6.21.orig/drivers/char/apm-emulation.c     2008-02-21 00:32:41.000000000 +0000
++++ linux-2.6.21/drivers/char/apm-emulation.c  2008-02-21 00:33:43.000000000 +0000
+@@ -206,10 +206,18 @@
+       return ret;
+ }
++static in_suspend;
++
+ static void apm_suspend(void)
+ {
+       struct apm_user *as;
+-      int err = pm_suspend(PM_SUSPEND_MEM);
++      int err;
++
++      in_suspend = 1;
++
++      err = pm_suspend(PM_SUSPEND_MEM);
++
++      in_suspend = 0;
+       /*
+        * Anyone on the APM queues will think we're still suspended.
+@@ -663,6 +671,9 @@
+ {
+       unsigned long flags;
++      if (in_suspend)
++              return;
++
+       spin_lock_irqsave(&kapmd_queue_lock, flags);
+       queue_add_event(&kapmd_queue, event);
+       spin_unlock_irqrestore(&kapmd_queue_lock, flags);
index 65e8d459c152f24be259435f9fcdd33c376333f0..a1de662c6a2e82c07362fab95670c3717057bb72 100644 (file)
@@ -9,7 +9,7 @@ KERNEL_RELEASE = "2.6.22.5"
 #PV = "${VANILLA_VERSION}+${KERNEL_RELEASE}-moko11+svnr${SRCREV}"
 
 PV = "${KERNEL_RELEASE}-moko11+svnr${SRCREV}"
-PR = "r14"
+PR = "r15"
 
 KERNEL_IMAGETYPE = "uImage"
 UBOOT_ENTRYPOINT = "30008000"
@@ -26,6 +26,7 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${VANILLA_VERSION}.ta
            file://fix-gta01-flowcontrol2-2.6.22.5.patch;patch=1 \
            file://gta-vibro-pwm-suspend.patch;patch=1 \
            file://tweak_power_button.patch;patch=1 \
+          file://break_suspend_cycle.patch;patch=1 \
            http://www.rpsys.net/openzaurus/patches/archive/input_power-r9.patch;patch=1 \
            file://defconfig-${KERNEL_RELEASE}"