1 --- linux/arch/arm/mach-sa1100/collie_apm.c 2005-06-25 23:37:32.000000000 +0200
2 +++ linux/arch/arm/mach-sa1100/collie_apm.c 2005-06-27 20:42:00.000000000 +0200
3 @@ -1228,10 +1228,11 @@
7 - if (send_event(event)) {
8 - queue_event(event, NULL);
9 - if (standbys_pending <= 0)
10 + queue_event(event, NULL);
11 + if (standbys_pending <= 0) {
12 + if (send_event(event)) {
18 @@ -1257,10 +1258,10 @@
20 if (waiting_for_resume)
22 - if (send_event(event)) {
23 - queue_event(event, NULL);
24 - waiting_for_resume = 1;
25 - if (suspends_pending <= 0)
26 + queue_event(event, NULL);
27 + waiting_for_resume = 1;
28 + if (suspends_pending <= 0)
29 + if (send_event(event)) {
33 @@ -1468,25 +1469,32 @@
35 as->standbys_pending--;
37 - } else if (!send_event(APM_USER_STANDBY))
41 queue_event(APM_USER_STANDBY, as);
42 - if (standbys_pending <= 0)
45 + if (standbys_pending <= 0) {
46 + if (send_event(APM_USER_STANDBY)) {
54 if (as->suspends_read > 0) {
56 as->suspends_pending--;
58 - } else if (!send_event(APM_USER_SUSPEND))
62 queue_event(APM_USER_SUSPEND, as);
64 if (suspends_pending <= 0) {
65 - if (suspend() != APM_SUCCESS)
67 + if (send_event(APM_USER_SUSPEND)) {
68 + if (suspend() != APM_SUCCESS)
75 add_wait_queue(&apm_suspend_waitqueue, &wait);
76 @@ -1637,13 +1645,19 @@
78 if (as->standbys_pending > 0) {
79 standbys_pending -= as->standbys_pending;
80 - if (standbys_pending <= 0)
82 + if (standbys_pending <= 0) {
83 + if (send_event(APM_USER_STANDBY)) {
88 if (as->suspends_pending > 0) {
89 suspends_pending -= as->suspends_pending;
90 - if (suspends_pending <= 0)
92 + if (suspends_pending <= 0) {
93 + if (send_event(APM_USER_SUSPEND)) {