summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2008-02-21 00:58:17 +0000
committerRichard Purdie <richard@openedhand.com>2008-02-21 00:58:17 +0000
commitfd37b166ecc3370c21260e172fbb9bbb4cdaea0d (patch)
treeabc1cadc4088e0e270072abcf37400ce585664b8
parent2e7d772b7e0e4941ea9ea9a4284fe1563a52aa03 (diff)
downloadpoky-fd37b166ecc3370c21260e172fbb9bbb4cdaea0d.tar.gz
linux-openmoko: Break immediate suspend on resume cycle
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3839 311d38ba-8fff-0310-9ca6-ca027cbcb966
-rw-r--r--meta/packages/linux/linux-openmoko/break_suspend_cycle.patch34
-rw-r--r--meta/packages/linux/linux-openmoko_2.6.22.5.bb3
2 files changed, 36 insertions, 1 deletions
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
index 0000000000..2a721481d0
--- /dev/null
+++ b/meta/packages/linux/linux-openmoko/break_suspend_cycle.patch
@@ -0,0 +1,34 @@
1Index: linux-2.6.21/drivers/char/apm-emulation.c
2===================================================================
3--- linux-2.6.21.orig/drivers/char/apm-emulation.c 2008-02-21 00:32:41.000000000 +0000
4+++ linux-2.6.21/drivers/char/apm-emulation.c 2008-02-21 00:33:43.000000000 +0000
5@@ -206,10 +206,18 @@
6 return ret;
7 }
8
9+static in_suspend;
10+
11 static void apm_suspend(void)
12 {
13 struct apm_user *as;
14- int err = pm_suspend(PM_SUSPEND_MEM);
15+ int err;
16+
17+ in_suspend = 1;
18+
19+ err = pm_suspend(PM_SUSPEND_MEM);
20+
21+ in_suspend = 0;
22
23 /*
24 * Anyone on the APM queues will think we're still suspended.
25@@ -663,6 +671,9 @@
26 {
27 unsigned long flags;
28
29+ if (in_suspend)
30+ return;
31+
32 spin_lock_irqsave(&kapmd_queue_lock, flags);
33 queue_add_event(&kapmd_queue, event);
34 spin_unlock_irqrestore(&kapmd_queue_lock, flags);
diff --git a/meta/packages/linux/linux-openmoko_2.6.22.5.bb b/meta/packages/linux/linux-openmoko_2.6.22.5.bb
index 65e8d459c1..a1de662c6a 100644
--- a/meta/packages/linux/linux-openmoko_2.6.22.5.bb
+++ b/meta/packages/linux/linux-openmoko_2.6.22.5.bb
@@ -9,7 +9,7 @@ KERNEL_RELEASE = "2.6.22.5"
9#PV = "${VANILLA_VERSION}+${KERNEL_RELEASE}-moko11+svnr${SRCREV}" 9#PV = "${VANILLA_VERSION}+${KERNEL_RELEASE}-moko11+svnr${SRCREV}"
10 10
11PV = "${KERNEL_RELEASE}-moko11+svnr${SRCREV}" 11PV = "${KERNEL_RELEASE}-moko11+svnr${SRCREV}"
12PR = "r14" 12PR = "r15"
13 13
14KERNEL_IMAGETYPE = "uImage" 14KERNEL_IMAGETYPE = "uImage"
15UBOOT_ENTRYPOINT = "30008000" 15UBOOT_ENTRYPOINT = "30008000"
@@ -26,6 +26,7 @@ SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-${VANILLA_VERSION}.ta
26 file://fix-gta01-flowcontrol2-2.6.22.5.patch;patch=1 \ 26 file://fix-gta01-flowcontrol2-2.6.22.5.patch;patch=1 \
27 file://gta-vibro-pwm-suspend.patch;patch=1 \ 27 file://gta-vibro-pwm-suspend.patch;patch=1 \
28 file://tweak_power_button.patch;patch=1 \ 28 file://tweak_power_button.patch;patch=1 \
29 file://break_suspend_cycle.patch;patch=1 \
29 http://www.rpsys.net/openzaurus/patches/archive/input_power-r9.patch;patch=1 \ 30 http://www.rpsys.net/openzaurus/patches/archive/input_power-r9.patch;patch=1 \
30 file://defconfig-${KERNEL_RELEASE}" 31 file://defconfig-${KERNEL_RELEASE}"
31 32