[-mm patch] include/linux/bug.h must always #include <linux/module.h>

From: Adrian Bunk
Date: Sat Nov 25 2006 - 14:16:57 EST


This patch fixes the folliwing compile error with CONFIG_BUG=n:

<-- snip -->

...
CC arch/i386/kernel/traps.o
In file included from
/home/bunk/linux/kernel-2.6/linux-2.6.19-rc6-mm1/arch/i386/kernel/traps.c:32:
/home/bunk/linux/kernel-2.6/linux-2.6.19-rc6-mm1/include/linux/bug.h:38: warning: type defaults to 'int' in declaration of 'Elf_Ehdr'
/home/bunk/linux/kernel-2.6/linux-2.6.19-rc6-mm1/include/linux/bug.h:38: error: expected ';', ',' or ')' before '*' token
...
make[2]: *** [arch/i386/kernel/traps.o] Error 1

<-- snip -->

Signed-off-by: Adrian Bunk <bunk@xxxxxxxxx>

--- linux-2.6.19-rc6-mm1/include/linux/bug.h.old 2006-11-24 23:25:50.000000000 +0100
+++ linux-2.6.19-rc6-mm1/include/linux/bug.h 2006-11-24 23:26:04.000000000 +0100
@@ -1,6 +1,7 @@
#ifndef _LINUX_BUG_H
#define _LINUX_BUG_H

+#include <linux/module.h>
#include <asm/bug.h>

enum bug_trap_type {
@@ -10,7 +11,6 @@
};

#ifdef CONFIG_GENERIC_BUG
-#include <linux/module.h>
#include <asm-generic/bug.h>

static inline int is_warning_bug(const struct bug_entry *bug)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/