[PATCH 5/5] bitops: forbid asm-generic/bitops/le.h direct inclusion

From: Akinobu Mita
Date: Fri Oct 08 2010 - 06:01:10 EST


asm-generic/bitops/le.h is only intended to be included directly from
asm-generic/bitops/ext2-non-atomic.h or asm-generic/bitops/minix-le.h
which implements generic ext2 or minix bit operations.

But there were some source files that include it directly.
(those are already fixed by other commits)

This forbids asm-generic/bitops/le.h direct inclusion in the future.

Signed-off-by: Akinobu Mita <akinobu.mita@xxxxxxxxx>
---
include/asm-generic/bitops/le.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/include/asm-generic/bitops/le.h b/include/asm-generic/bitops/le.h
index db2be81..f8d0225 100644
--- a/include/asm-generic/bitops/le.h
+++ b/include/asm-generic/bitops/le.h
@@ -1,6 +1,11 @@
#ifndef _ASM_GENERIC_BITOPS_LE_H_
#define _ASM_GENERIC_BITOPS_LE_H_

+#if !defined(_ASM_GENERIC_BITOPS_MINIX_LE_H_) && \
+ !defined(_ASM_GENERIC_BITOPS_EXT2_NON_ATOMIC_H_)
+#error only minix-le.h and ext2-non-atomic.h can be included directly
+#endif
+
#include <asm/types.h>
#include <asm/byteorder.h>

--
1.7.1.231.gd0b16

--
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/