lkml.org 
[lkml]   [2018]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/7] genirq/debugfs: Use irq_print_chip method if available
Date
If an irqchip has provided an irq_print_chip method, let's use
it instead of the name field directly.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
kernel/irq/debugfs.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/debugfs.c b/kernel/irq/debugfs.c
index da41150322e1..50e324110271 100644
--- a/kernel/irq/debugfs.c
+++ b/kernel/irq/debugfs.c
@@ -69,7 +69,13 @@ irq_debug_show_chip(struct seq_file *m, struct irq_data *data, int ind)
seq_printf(m, "chip: None\n");
return;
}
- seq_printf(m, "%*schip: %s\n", ind, "", chip->name);
+ seq_printf(m, "%*schip: ", ind, "");
+ if (chip->irq_print_chip) {
+ chip->irq_print_chip(data, m);
+ seq_printf(m, "\n");
+ } else {
+ seq_printf(m, "%s\n", chip->name);
+ }
seq_printf(m, "%*sflags: 0x%lx\n", ind + 1, "", chip->flags);
irq_debug_show_bits(m, ind, chip->flags, irqchip_flags,
ARRAY_SIZE(irqchip_flags));
--
2.14.2
\
 
 \ /
  Last update: 2018-04-24 16:38    [W:0.050 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site