Skip to content

Commit

Permalink
ARM: irq: Call irqchip_init if no init_irq function is specified
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Maxime Ripard authored and Olof Johansson committed Apr 2, 2013
1 parent c257307 commit ebafed7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion arch/arm/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/irqchip.h>
#include <linux/random.h>
#include <linux/smp.h>
#include <linux/init.h>
Expand Down Expand Up @@ -114,7 +115,10 @@ EXPORT_SYMBOL_GPL(set_irq_flags);

void __init init_IRQ(void)
{
machine_desc->init_irq();
if (IS_ENABLED(CONFIG_OF) && !machine_desc->init_irq)
irqchip_init();
else
machine_desc->init_irq();
}

#ifdef CONFIG_MULTI_IRQ_HANDLER
Expand Down

0 comments on commit ebafed7

Please sign in to comment.