Commit 73171d15 authored by Thomas Petazzoni's avatar Thomas Petazzoni Committed by Rob Herring

arm: add set_handle_irq() to register the parent IRQ controller handler function

In order to allow irqchip drivers to register their IRQ handling
function as the parent IRQ controller handler function, we provide a
convenience function. This will avoid poking directly into the global
handle_arch_irq variable.

Suggested by Arnd Bergmann.
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Rob Herring: remove warning. 1st one to initialize wins.]
Signed-off-by: default avatarRob Herring <rob.herring@calxeda.com>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
parent f6e916b8
......@@ -22,6 +22,7 @@ extern int show_fiq_list(struct seq_file *, int);
#ifdef CONFIG_MULTI_IRQ_HANDLER
extern void (*handle_arch_irq)(struct pt_regs *);
extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));
#endif
/*
......
......@@ -117,6 +117,16 @@ void __init init_IRQ(void)
machine_desc->init_irq();
}
#ifdef CONFIG_MULTI_IRQ_HANDLER
void __init set_handle_irq(void (*handle_irq)(struct pt_regs *))
{
if (handle_arch_irq)
return;
handle_arch_irq = handle_irq;
}
#endif
#ifdef CONFIG_SPARSE_IRQ
int __init arch_probe_nr_irqs(void)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment