summaryrefslogtreecommitdiff
path: root/kernel/irq
diff options
context:
space:
mode:
authorKeguang Zhang <keguang.zhang@gmail.com>2023-09-25 20:17:34 +0800
committerThomas Gleixner <tglx@linutronix.de>2023-10-13 12:25:31 +0200
commit021a8ca2ba23c01487a98ad23b68ac062e14cf32 (patch)
tree64c7f3961953fb6f103912bc6f89d5a5cb42bd99 /kernel/irq
parent6260ecd04594360ae2af104fb2641317728a66e4 (diff)
genirq/generic-chip: Fix the irq_chip name for /proc/interrupts
irq_init_generic_chip() only sets the name for the first chip type, which leads to empty names for other chip types. Eventually, these names will be shown as "-" /proc/interrupts. Set the name for all chip types by default. Signed-off-by: Keguang Zhang <keguang.zhang@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/20230925121734.93017-1-keguang.zhang@gmail.com
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/generic-chip.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index c653cd31548d..81ecca08caad 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -219,11 +219,15 @@ void irq_init_generic_chip(struct irq_chip_generic *gc, const char *name,
int num_ct, unsigned int irq_base,
void __iomem *reg_base, irq_flow_handler_t handler)
{
+ struct irq_chip_type *ct = gc->chip_types;
+ int i;
+
raw_spin_lock_init(&gc->lock);
gc->num_ct = num_ct;
gc->irq_base = irq_base;
gc->reg_base = reg_base;
- gc->chip_types->chip.name = name;
+ for (i = 0; i < num_ct; i++)
+ ct[i].chip.name = name;
gc->chip_types->handler = handler;
}