diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-10-19 02:40:26 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-19 14:53:41 -0400 |
commit | 0624517d809b1cf53c977335c9bda4c216cbddee (patch) | |
tree | 5791430160f4423cab3c6085baed815e10c421f7 /include/asm-generic/bitops.h | |
parent | 1977f032722c27ee3730284582fd3991ad9ac81b (diff) |
forbid asm/bitops.h direct inclusion
forbid asm/bitops.h direct inclusion
Because of compile errors that may occur after bit changes if asm/bitops.h is
included directly without e.g. linux/kernel.h which includes linux/bitops.h,
forbid direct inclusion of asm/bitops.h. Thanks to Adrian Bunk.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-generic/bitops.h')
-rw-r--r-- | include/asm-generic/bitops.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-generic/bitops.h b/include/asm-generic/bitops.h index e022a0f59e6b..15e6f253dda4 100644 --- a/include/asm-generic/bitops.h +++ b/include/asm-generic/bitops.h | |||
@@ -19,6 +19,10 @@ | |||
19 | 19 | ||
20 | #ifdef __KERNEL__ | 20 | #ifdef __KERNEL__ |
21 | 21 | ||
22 | #ifndef _LINUX_BITOPS_H | ||
23 | #error only <linux/bitops.h> can be included directly | ||
24 | #endif | ||
25 | |||
22 | #include <asm-generic/bitops/sched.h> | 26 | #include <asm-generic/bitops/sched.h> |
23 | #include <asm-generic/bitops/ffs.h> | 27 | #include <asm-generic/bitops/ffs.h> |
24 | #include <asm-generic/bitops/hweight.h> | 28 | #include <asm-generic/bitops/hweight.h> |