Skip to content

Commit

Permalink
genirq/generic-chip: Fix the irq_chip name for /proc/interrupts
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kelvincheung authored and KAGA-KOKO committed Oct 13, 2023
1 parent 6260ecd commit 021a8ca
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kernel/irq/generic-chip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 021a8ca

Please sign in to comment.