Skip to content

Commit 021a8ca

Browse files
kelvincheungKAGA-KOKO
authored andcommitted
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
1 parent 6260ecd commit 021a8ca

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

kernel/irq/generic-chip.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,11 +219,15 @@ void irq_init_generic_chip(struct irq_chip_generic *gc, const char *name,
219219
int num_ct, unsigned int irq_base,
220220
void __iomem *reg_base, irq_flow_handler_t handler)
221221
{
222+
struct irq_chip_type *ct = gc->chip_types;
223+
int i;
224+
222225
raw_spin_lock_init(&gc->lock);
223226
gc->num_ct = num_ct;
224227
gc->irq_base = irq_base;
225228
gc->reg_base = reg_base;
226-
gc->chip_types->chip.name = name;
229+
for (i = 0; i < num_ct; i++)
230+
ct[i].chip.name = name;
227231
gc->chip_types->handler = handler;
228232
}
229233

0 commit comments

Comments
 (0)