From 0624517d809b1cf53c977335c9bda4c216cbddee Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 18 Oct 2007 23:40:26 -0700 Subject: 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 Cc: Adrian Bunk Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-x86/bitops_32.h | 4 ++++ include/asm-x86/bitops_64.h | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'include/asm-x86') diff --git a/include/asm-x86/bitops_32.h b/include/asm-x86/bitops_32.h index c96641f75022..3268a341cf49 100644 --- a/include/asm-x86/bitops_32.h +++ b/include/asm-x86/bitops_32.h @@ -5,6 +5,10 @@ * Copyright 1992, Linus Torvalds. */ +#ifndef _LINUX_BITOPS_H +#error only can be included directly +#endif + #include #include diff --git a/include/asm-x86/bitops_64.h b/include/asm-x86/bitops_64.h index 525edf2ce5c2..dacaa5f1febc 100644 --- a/include/asm-x86/bitops_64.h +++ b/include/asm-x86/bitops_64.h @@ -5,6 +5,10 @@ * Copyright 1992, Linus Torvalds. */ +#ifndef _LINUX_BITOPS_H +#error only can be included directly +#endif + #include #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1) -- cgit v1.2.3