diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-20 05:18:36 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-12-24 04:49:51 -0500 |
commit | 8ff1443c5439ecee7472b80cf12ecfc337e6ee98 (patch) | |
tree | b6899444bc0b66a016d29271c5d70e8ad43db5ca /arch/arm/kernel/irq.c | |
parent | cd544ce754ac2432ffcc0626ea802d2b30876b50 (diff) |
ARM: simplify early machine init hooks
Rather than storing each machine init hook separately, store a
pointer to the machine description record and dereference this
instead. This pointer is only available while the init sections
are present, which is not a problem as we only use it from init
code.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/irq.c')
-rw-r--r-- | arch/arm/kernel/irq.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 36ad3be4692a..a591971dbf7b 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/proc_fs.h> | 37 | #include <linux/proc_fs.h> |
38 | 38 | ||
39 | #include <asm/system.h> | 39 | #include <asm/system.h> |
40 | #include <asm/mach/arch.h> | ||
40 | #include <asm/mach/irq.h> | 41 | #include <asm/mach/irq.h> |
41 | #include <asm/mach/time.h> | 42 | #include <asm/mach/time.h> |
42 | 43 | ||
@@ -47,8 +48,6 @@ | |||
47 | #define irq_finish(irq) do { } while (0) | 48 | #define irq_finish(irq) do { } while (0) |
48 | #endif | 49 | #endif |
49 | 50 | ||
50 | unsigned int arch_nr_irqs; | ||
51 | void (*init_arch_irq)(void) __initdata = NULL; | ||
52 | unsigned long irq_err_count; | 51 | unsigned long irq_err_count; |
53 | 52 | ||
54 | int show_interrupts(struct seq_file *p, void *v) | 53 | int show_interrupts(struct seq_file *p, void *v) |
@@ -154,13 +153,13 @@ void set_irq_flags(unsigned int irq, unsigned int iflags) | |||
154 | 153 | ||
155 | void __init init_IRQ(void) | 154 | void __init init_IRQ(void) |
156 | { | 155 | { |
157 | init_arch_irq(); | 156 | machine_desc->init_irq(); |
158 | } | 157 | } |
159 | 158 | ||
160 | #ifdef CONFIG_SPARSE_IRQ | 159 | #ifdef CONFIG_SPARSE_IRQ |
161 | int __init arch_probe_nr_irqs(void) | 160 | int __init arch_probe_nr_irqs(void) |
162 | { | 161 | { |
163 | nr_irqs = arch_nr_irqs ? arch_nr_irqs : NR_IRQS; | 162 | nr_irqs = machine_desc->nr_irqs ? machine_desc->nr_irqs : NR_IRQS; |
164 | return nr_irqs; | 163 | return nr_irqs; |
165 | } | 164 | } |
166 | #endif | 165 | #endif |