summaryrefslogtreecommitdiff
path: root/packages/linux/openzaurus-sa-2.4.18-rmk7-pxa3-embedix20030509/unb0rk-apm.patch
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2005-06-30 08:19:37 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-06-30 08:19:37 +0000
commitc8e5702127e507e82e6f68a4b8c546803accea9d (patch)
tree00583491f40ecc640f2b28452af995e3a63a09d7 /packages/linux/openzaurus-sa-2.4.18-rmk7-pxa3-embedix20030509/unb0rk-apm.patch
parent87ec8ca4d2e2eb4d1c1e1e1a6b46a395d56805b9 (diff)
import clean BK tree at cset 1.3670
Diffstat (limited to 'packages/linux/openzaurus-sa-2.4.18-rmk7-pxa3-embedix20030509/unb0rk-apm.patch')
-rw-r--r--packages/linux/openzaurus-sa-2.4.18-rmk7-pxa3-embedix20030509/unb0rk-apm.patch99
1 files changed, 99 insertions, 0 deletions
diff --git a/packages/linux/openzaurus-sa-2.4.18-rmk7-pxa3-embedix20030509/unb0rk-apm.patch b/packages/linux/openzaurus-sa-2.4.18-rmk7-pxa3-embedix20030509/unb0rk-apm.patch
index e69de29bb2..5a1d4ec8dc 100644
--- a/packages/linux/openzaurus-sa-2.4.18-rmk7-pxa3-embedix20030509/unb0rk-apm.patch
+++ b/packages/linux/openzaurus-sa-2.4.18-rmk7-pxa3-embedix20030509/unb0rk-apm.patch
@@ -0,0 +1,99 @@
+--- linux/arch/arm/mach-sa1100/collie_apm.c 2005-06-25 23:37:32.000000000 +0200
++++ linux/arch/arm/mach-sa1100/collie_apm.c 2005-06-27 20:42:00.000000000 +0200
+@@ -1228,10 +1228,11 @@
+ switch (event) {
+ case APM_SYS_STANDBY:
+ case APM_USER_STANDBY:
+- if (send_event(event)) {
+- queue_event(event, NULL);
+- if (standbys_pending <= 0)
++ queue_event(event, NULL);
++ if (standbys_pending <= 0) {
++ if (send_event(event)) {
+ standby();
++ }
+ }
+ break;
+
+@@ -1257,10 +1258,10 @@
+ */
+ if (waiting_for_resume)
+ return;
+- if (send_event(event)) {
+- queue_event(event, NULL);
+- waiting_for_resume = 1;
+- if (suspends_pending <= 0)
++ queue_event(event, NULL);
++ waiting_for_resume = 1;
++ if (suspends_pending <= 0)
++ if (send_event(event)) {
+ (void) suspend();
+ }
+ break;
+@@ -1468,25 +1469,32 @@
+ as->standbys_read--;
+ as->standbys_pending--;
+ standbys_pending--;
+- } else if (!send_event(APM_USER_STANDBY))
+- return -EAGAIN;
+- else
++ } else {
+ queue_event(APM_USER_STANDBY, as);
+- if (standbys_pending <= 0)
+- standby();
++ }
++ if (standbys_pending <= 0) {
++ if (send_event(APM_USER_STANDBY)) {
++ standby();
++ } else {
++ return -EAGAIN;
++ }
++ }
+ break;
+ case APM_IOC_SUSPEND:
+ if (as->suspends_read > 0) {
+ as->suspends_read--;
+ as->suspends_pending--;
+ suspends_pending--;
+- } else if (!send_event(APM_USER_SUSPEND))
+- return -EAGAIN;
+- else
++ } else {
+ queue_event(APM_USER_SUSPEND, as);
++ }
+ if (suspends_pending <= 0) {
+- if (suspend() != APM_SUCCESS)
+- return -EIO;
++ if (send_event(APM_USER_SUSPEND)) {
++ if (suspend() != APM_SUCCESS)
++ return -EIO;
++ } else {
++ return -EAGAIN;
++ }
+ } else {
+ as->suspend_wait = 1;
+ add_wait_queue(&apm_suspend_waitqueue, &wait);
+@@ -1637,13 +1645,19 @@
+ lock_kernel();
+ if (as->standbys_pending > 0) {
+ standbys_pending -= as->standbys_pending;
+- if (standbys_pending <= 0)
+- standby();
++ if (standbys_pending <= 0) {
++ if (send_event(APM_USER_STANDBY)) {
++ standby();
++ }
++ }
+ }
+ if (as->suspends_pending > 0) {
+ suspends_pending -= as->suspends_pending;
+- if (suspends_pending <= 0)
+- (void) suspend();
++ if (suspends_pending <= 0) {
++ if (send_event(APM_USER_SUSPEND)) {
++ (void) suspend();
++ }
++ }
+ }
+ if (user_list == as)
+ user_list = as->next;