Skip to content

Commit 0a25cb5

Browse files
author
Marc Zyngier
committed
genirq/debugfs: Use irq_print_chip() when provided by irqchip
Since irqchips have the option to implement irq_print_chip, use this when available to output the irqchip name in debugfs. Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220215112154.1360040-1-maz@kernel.org
1 parent 393e128 commit 0a25cb5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

kernel/irq/debugfs.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,12 @@ irq_debug_show_chip(struct seq_file *m, struct irq_data *data, int ind)
6969
seq_printf(m, "chip: None\n");
7070
return;
7171
}
72-
seq_printf(m, "%*schip: %s\n", ind, "", chip->name);
73-
seq_printf(m, "%*sflags: 0x%lx\n", ind + 1, "", chip->flags);
72+
seq_printf(m, "%*schip: ", ind, "");
73+
if (chip->irq_print_chip)
74+
chip->irq_print_chip(data, m);
75+
else
76+
seq_printf(m, "%s", chip->name);
77+
seq_printf(m, "\n%*sflags: 0x%lx\n", ind + 1, "", chip->flags);
7478
irq_debug_show_bits(m, ind, chip->flags, irqchip_flags,
7579
ARRAY_SIZE(irqchip_flags));
7680
}

0 commit comments

Comments
 (0)