[PATCH] Declare init_irq_proc before we use it.
authorAndrew Morton <akpm@osdl.org>
Sun, 18 Feb 2007 05:22:39 +0000 (21:22 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 19 Feb 2007 22:21:50 +0000 (14:21 -0800)
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>
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
include/linux/irq.h
init/main.c

index 587ef7f4fcc777394d7d8fc08cd80f9974077cff..3e4f479271c9b144528746e95748682b58fc9e72 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
 #include <linux/seq_file.h>
+#include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/random.h>
 #include <linux/bootmem.h>
index 567f681ddfec4051aafe0e8cc4d90dcfbb389653..a71d6e2a3919d1075785fa9bf4101d4d47b7cab5 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/kernel_stat.h>
 #include <linux/seq_file.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
 #include <linux/bootmem.h>
 #include <linux/random.h>
 #include <linux/hardirq.h>
index 84aceca6c05c16297ce244431c1cbdb0f741a441..b66c97c904b37aba8bd25ca57c5973f65ecd028d 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/sched.h>
+#include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 #include <linux/errno.h>
 #include <linux/init.h>
index a57239ec6c8c6fe05453d73330b6034b0e4ea197..20f12a19a52257e8ef0072aa7dc0c8e894891a34 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/types.h>
 #include <linux/init.h>
 #include <linux/sched.h>
+#include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 #include <linux/errno.h>
 #include <linux/seq_file.h>
index e5ea1411050bfec4c8c1f9d2c6ea0899159cc668..838cf5a5bd7f63d230ed6f469ede7e54bfc70649 100644 (file)
@@ -423,4 +423,13 @@ extern int probe_irq_off(unsigned long);   /* returns 0 or negative on failure */
 extern unsigned int probe_irq_mask(unsigned long);     /* returns mask of ISA interrupts */
 #endif
 
+#ifdef CONFIG_PROC_FS
+/* Initialize /proc/irq/ */
+extern void init_irq_proc(void);
+#else
+static inline void init_irq_proc(void)
+{
+}
+#endif
+
 #endif
index 1939d42c21d266f66ebfa62b4b20e0db1277a599..aa5b3e6178a03657681915bfad659fec34111c40 100644 (file)
@@ -328,9 +328,6 @@ extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
 /* Resending of interrupts :*/
 void check_irq_resend(struct irq_desc *desc, unsigned int irq);
 
-/* Initialize /proc/irq/ */
-extern void init_irq_proc(void);
-
 /* Enable/disable irq debugging output: */
 extern int noirqdebug_setup(char *str);
 
index 953500b02ac4136f4ad30aa0ea6b285019234131..1c5f6dce1bd2d062ab780a99b8417d9ceb7813b0 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/cpuset.h>
 #include <linux/efi.h>
 #include <linux/tick.h>
+#include <linux/interrupt.h>
 #include <linux/taskstats_kern.h>
 #include <linux/delayacct.h>
 #include <linux/unistd.h>
@@ -702,11 +703,7 @@ static void __init do_basic_setup(void)
        init_workqueues();
        usermodehelper_init();
        driver_init();
-
-#ifdef CONFIG_PROC_FS
        init_irq_proc();
-#endif
-
        do_initcalls();
 }