Skip to content

Commit ebafed7

Browse files
mripardolofj
authored andcommitted
ARM: irq: Call irqchip_init if no init_irq function is specified
More and more sub-architectures are using only the irqchip_init function. Make the core code call this function if no init_irq field is provided in the machine description to remove some boilerplate code. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Acked-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Olof Johansson <olof@lixom.net>
1 parent c257307 commit ebafed7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎arch/arm/kernel/irq.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/ioport.h>
2727
#include <linux/interrupt.h>
2828
#include <linux/irq.h>
29+
#include <linux/irqchip.h>
2930
#include <linux/random.h>
3031
#include <linux/smp.h>
3132
#include <linux/init.h>
@@ -114,7 +115,10 @@ EXPORT_SYMBOL_GPL(set_irq_flags);
114115

115116
void __init init_IRQ(void)
116117
{
117-
machine_desc->init_irq();
118+
if (IS_ENABLED(CONFIG_OF) && !machine_desc->init_irq)
119+
irqchip_init();
120+
else
121+
machine_desc->init_irq();
118122
}
119123

120124
#ifdef CONFIG_MULTI_IRQ_HANDLER

0 commit comments

Comments
 (0)