From 19de85ef574c3a2182e3ccad9581805052f14946 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Thu, 26 May 2011 16:26:09 -0700 Subject: bitops: add #ifndef for each of find bitops The style that we normally use in asm-generic is to test the macro itself for existence, so in asm-generic, do: #ifndef find_next_zero_bit_le extern unsigned long find_next_zero_bit_le(const void *addr, unsigned long size, unsigned long offset); #endif and in the architectures, write static inline unsigned long find_next_zero_bit_le(const void *addr, unsigned long size, unsigned long offset) #define find_next_zero_bit_le find_next_zero_bit_le This adds the #ifndef for each of the find bitops in the generic header and source files. Suggested-by: Arnd Bergmann Signed-off-by: Akinobu Mita Acked-by: Russell King Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Greg Ungerer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/bitops.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux/bitops.h') diff --git a/include/linux/bitops.h b/include/linux/bitops.h index 2184c6b97aeb..4829252d7cfa 100644 --- a/include/linux/bitops.h +++ b/include/linux/bitops.h @@ -149,6 +149,7 @@ static inline unsigned long __ffs64(u64 word) #ifdef __KERNEL__ #ifdef CONFIG_GENERIC_FIND_LAST_BIT +#ifndef find_last_bit /** * find_last_bit - find the last set bit in a memory region * @addr: The address to start the search at @@ -158,6 +159,7 @@ static inline unsigned long __ffs64(u64 word) */ extern unsigned long find_last_bit(const unsigned long *addr, unsigned long size); +#endif #endif /* CONFIG_GENERIC_FIND_LAST_BIT */ #endif /* __KERNEL__ */ -- cgit v1.2.3-59-g8ed1b