From 6168a702ab0be181e5e57a0b2d0e7376f7a47f0b Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Sat, 17 Feb 2007 21:22:39 -0800 Subject: [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 Cc: Ingo Molnar Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/interrupt.h | 9 +++++++++ include/linux/irq.h | 3 --- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index e5ea1411050..838cf5a5bd7 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h @@ -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 diff --git a/include/linux/irq.h b/include/linux/irq.h index 1939d42c21d..aa5b3e6178a 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h @@ -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); -- cgit v1.2.3