Commit 6168a702ab0be181e5e57a0b2d0e7376f7a47f0b
Committed by
Linus Torvalds
1 parent
a6e6df25ec
[PATCH] Declare init_irq_proc before we use it.
powerpc gets: init/main.c: In function `do_basic_setup': init/main.c:714: warning: implicit declaration of function `init_irq_proc' but we cannot include linux/irq.h in generic code. Fix it by moving the declaration into linux/interrupt.h instead. And make sure all code that defines init_irq_proc() is including linux/interrupt.h. And nuke an ifdef-in-C Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 7 changed files with 14 additions and 7 deletions Side-by-side Diff
arch/h8300/kernel/ints.c
arch/h8300/platform/h8s/ints.c
arch/m68k/kernel/ints.c
arch/m68knommu/platform/5307/ints.c
include/linux/interrupt.h
... | ... | @@ -423,5 +423,14 @@ |
423 | 423 | extern unsigned int probe_irq_mask(unsigned long); /* returns mask of ISA interrupts */ |
424 | 424 | #endif |
425 | 425 | |
426 | +#ifdef CONFIG_PROC_FS | |
427 | +/* Initialize /proc/irq/ */ | |
428 | +extern void init_irq_proc(void); | |
429 | +#else | |
430 | +static inline void init_irq_proc(void) | |
431 | +{ | |
432 | +} | |
433 | +#endif | |
434 | + | |
426 | 435 | #endif |
include/linux/irq.h
... | ... | @@ -328,9 +328,6 @@ |
328 | 328 | /* Resending of interrupts :*/ |
329 | 329 | void check_irq_resend(struct irq_desc *desc, unsigned int irq); |
330 | 330 | |
331 | -/* Initialize /proc/irq/ */ | |
332 | -extern void init_irq_proc(void); | |
333 | - | |
334 | 331 | /* Enable/disable irq debugging output: */ |
335 | 332 | extern int noirqdebug_setup(char *str); |
336 | 333 |
init/main.c
... | ... | @@ -41,6 +41,7 @@ |
41 | 41 | #include <linux/cpuset.h> |
42 | 42 | #include <linux/efi.h> |
43 | 43 | #include <linux/tick.h> |
44 | +#include <linux/interrupt.h> | |
44 | 45 | #include <linux/taskstats_kern.h> |
45 | 46 | #include <linux/delayacct.h> |
46 | 47 | #include <linux/unistd.h> |
47 | 48 | |
... | ... | @@ -702,11 +703,7 @@ |
702 | 703 | init_workqueues(); |
703 | 704 | usermodehelper_init(); |
704 | 705 | driver_init(); |
705 | - | |
706 | -#ifdef CONFIG_PROC_FS | |
707 | 706 | init_irq_proc(); |
708 | -#endif | |
709 | - | |
710 | 707 | do_initcalls(); |
711 | 708 | } |
712 | 709 |