aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/syscore.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-07-11 04:51:49 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-07-11 04:51:49 -0400
commit887596224cca4dc4669c53e4d7a33fcfc9d9e823 (patch)
tree51cf1ce6f98ddf3e304c06b45c28265dfc9e4503 /drivers/base/syscore.c
parente3bbfa78bab125f58b831b5f7f45b5a305091d72 (diff)
PM: Reintroduce dropped call to check_wakeup_irqs
Patch 2e711c04dbbf7a7732a3f7073b1fc285d12b369d (PM: Remove sysdev suspend, resume and shutdown operations) deleted sysdev_suspend(), which was being relied on to call check_wakeup_irqs() in suspend. If check_wakeup_irqs() is not called, wake interrupts that are pending when suspend is entered may be lost. It also breaks IRQCHIP_MASK_ON_SUSPEND, which is handled in check_wakeup_irqs(). This patch adds a call to check_wakeup_irqs() in syscore_suspend(), similar to what was deleted in sysdev_suspend(). Signed-off-by: Colin Cross <ccross@android.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers/base/syscore.c')
-rw-r--r--drivers/base/syscore.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/base/syscore.c b/drivers/base/syscore.c
index c126db3cb7d1..e8d11b6630ee 100644
--- a/drivers/base/syscore.c
+++ b/drivers/base/syscore.c
@@ -9,6 +9,7 @@
9#include <linux/syscore_ops.h> 9#include <linux/syscore_ops.h>
10#include <linux/mutex.h> 10#include <linux/mutex.h>
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/interrupt.h>
12 13
13static LIST_HEAD(syscore_ops_list); 14static LIST_HEAD(syscore_ops_list);
14static DEFINE_MUTEX(syscore_ops_lock); 15static DEFINE_MUTEX(syscore_ops_lock);
@@ -48,6 +49,13 @@ int syscore_suspend(void)
48 struct syscore_ops *ops; 49 struct syscore_ops *ops;
49 int ret = 0; 50 int ret = 0;
50 51
52 pr_debug("Checking wakeup interrupts\n");
53
54 /* Return error code if there are any wakeup interrupts pending. */
55 ret = check_wakeup_irqs();
56 if (ret)
57 return ret;
58
51 WARN_ONCE(!irqs_disabled(), 59 WARN_ONCE(!irqs_disabled(),
52 "Interrupts enabled before system core suspend.\n"); 60 "Interrupts enabled before system core suspend.\n");
53 61