Skip to content

Commit

Permalink
PM: Reintroduce dropped call to check_wakeup_irqs
Browse files Browse the repository at this point in the history
Patch 2e711c0
(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>
  • Loading branch information
colincross authored and rjwysocki committed Jul 11, 2011
1 parent e3bbfa7 commit 8875962
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/base/syscore.c
Expand Up @@ -9,6 +9,7 @@
#include <linux/syscore_ops.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/interrupt.h>

static LIST_HEAD(syscore_ops_list);
static DEFINE_MUTEX(syscore_ops_lock);
Expand Down Expand Up @@ -48,6 +49,13 @@ int syscore_suspend(void)
struct syscore_ops *ops;
int ret = 0;

pr_debug("Checking wakeup interrupts\n");

/* Return error code if there are any wakeup interrupts pending. */
ret = check_wakeup_irqs();
if (ret)
return ret;

WARN_ONCE(!irqs_disabled(),
"Interrupts enabled before system core suspend.\n");

Expand Down

0 comments on commit 8875962

Please sign in to comment.