aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/bitops/find.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/asm-generic/bitops/find.h b/include/asm-generic/bitops/find.h
index 1914e9742512..30afec0db7d7 100644
--- a/include/asm-generic/bitops/find.h
+++ b/include/asm-generic/bitops/find.h
@@ -9,7 +9,32 @@ extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
9 long size, unsigned long offset); 9 long size, unsigned long offset);
10#endif 10#endif
11 11
12#ifdef CONFIG_GENERIC_FIND_FIRST_BIT
13
14/**
15 * find_first_bit - find the first set bit in a memory region
16 * @addr: The address to start the search at
17 * @size: The maximum size to search
18 *
19 * Returns the bit number of the first set bit.
20 */
21extern unsigned long find_first_bit(const unsigned long *addr,
22 unsigned long size);
23
24/**
25 * find_first_zero_bit - find the first cleared bit in a memory region
26 * @addr: The address to start the search at
27 * @size: The maximum size to search
28 *
29 * Returns the bit number of the first cleared bit.
30 */
31extern unsigned long find_first_zero_bit(const unsigned long *addr,
32 unsigned long size);
33#else /* CONFIG_GENERIC_FIND_FIRST_BIT */
34
12#define find_first_bit(addr, size) find_next_bit((addr), (size), 0) 35#define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
13#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0) 36#define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
14 37
38#endif /* CONFIG_GENERIC_FIND_FIRST_BIT */
39
15#endif /*_ASM_GENERIC_BITOPS_FIND_H_ */ 40#endif /*_ASM_GENERIC_BITOPS_FIND_H_ */