Skip to content

Commit

Permalink
[PATCH] Declare init_irq_proc before we use it.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Paul Mackerras <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Feb 19, 2007
1 parent a6e6df2 commit 6168a70
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions arch/h8300/kernel/ints.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/h8300/platform/h8s/ints.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/m68k/kernel/ints.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions arch/m68knommu/platform/5307/ints.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
9 changes: 9 additions & 0 deletions include/linux/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 0 additions & 3 deletions include/linux/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
5 changes: 1 addition & 4 deletions init/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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();
}

Expand Down

0 comments on commit 6168a70

Please sign in to comment.