Commit 6168a702ab0be181e5e57a0b2d0e7376f7a47f0b

Authored by Andrew Morton
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
... ... @@ -19,6 +19,7 @@
19 19 #include <linux/sched.h>
20 20 #include <linux/kernel_stat.h>
21 21 #include <linux/seq_file.h>
  22 +#include <linux/interrupt.h>
22 23 #include <linux/init.h>
23 24 #include <linux/random.h>
24 25 #include <linux/bootmem.h>
arch/h8300/platform/h8s/ints.c
... ... @@ -20,6 +20,7 @@
20 20 #include <linux/kernel_stat.h>
21 21 #include <linux/seq_file.h>
22 22 #include <linux/init.h>
  23 +#include <linux/interrupt.h>
23 24 #include <linux/bootmem.h>
24 25 #include <linux/random.h>
25 26 #include <linux/hardirq.h>
arch/m68k/kernel/ints.c
... ... @@ -28,6 +28,7 @@
28 28 #include <linux/module.h>
29 29 #include <linux/types.h>
30 30 #include <linux/sched.h>
  31 +#include <linux/interrupt.h>
31 32 #include <linux/kernel_stat.h>
32 33 #include <linux/errno.h>
33 34 #include <linux/init.h>
arch/m68knommu/platform/5307/ints.c
... ... @@ -19,6 +19,7 @@
19 19 #include <linux/types.h>
20 20 #include <linux/init.h>
21 21 #include <linux/sched.h>
  22 +#include <linux/interrupt.h>
22 23 #include <linux/kernel_stat.h>
23 24 #include <linux/errno.h>
24 25 #include <linux/seq_file.h>
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
... ... @@ -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  
... ... @@ -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