From: Todd Poynor <toddpoynor@google.com>
Date: Mon, 24 Jan 2011 22:36:39 +0000 (-0800)
Subject: PM: Print pending wakeup IRQ preventing suspend to dmesg
X-Git-Tag: firefly_0821_release~4090^2~895
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b47faa23a40143b2545297b4d626e34feabf33cd;p=firefly-linux-kernel-4.4.55.git

PM: Print pending wakeup IRQ preventing suspend to dmesg

Prints the name of the first action for a pending wakeup IRQ.

Change-Id: I36f90735c75fb7c7ab1084775ec0d0ab02336e6e
Signed-off-by: Todd Poynor <toddpoynor@google.com>
---

diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index 15e53b1766a6..fe4b09cf829c 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -104,8 +104,13 @@ int check_wakeup_irqs(void)
 
 	for_each_irq_desc(irq, desc) {
 		if (irqd_is_wakeup_set(&desc->irq_data)) {
-			if (desc->istate & IRQS_PENDING)
+			if (desc->istate & IRQS_PENDING) {
+				pr_info("Wakeup IRQ %d %s pending, suspend aborted\n",
+					irq,
+					desc->action && desc->action->name ?
+					desc->action->name : "");
 				return -EBUSY;
+			}
 			continue;
 		}
 		/*