OSDN Git Service

msm: show_resume_irq: print the irq name
authorAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Mon, 19 Aug 2013 22:03:14 +0000 (15:03 -0700)
committerYimin Peng <yiminp@codeaurora.org>
Thu, 3 May 2018 07:15:38 +0000 (15:15 +0800)
Just printing the irq number is not informative. Update the code
to show the name of the interrupt's irq action.

Change-Id: Ia3e7d37948860b23d4390808769cd198656eba48
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
drivers/irqchip/irq-gic.c

index 20800b1..3566a3d 100644 (file)
@@ -277,7 +277,16 @@ static void gic_show_resume_irq(struct gic_chip_data *gic)
                i < gic->gic_irqs;
                i = find_next_bit((unsigned long *)pending,
                                gic->gic_irqs, i+1)) {
-               pr_warn("%s: %d triggered", __func__, i + gic->irq_offset);
+               struct irq_desc *desc = irq_to_desc(i + gic->irq_offset);
+               const char *name = "null";
+
+               if (desc == NULL)
+                       name = "stray irq";
+               else if (desc->action && desc->action->name)
+                       name = desc->action->name;
+
+               pr_warn("%s: %d triggered %s\n", __func__,
+                                       i + gic->irq_offset, name);
        }
 }