diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-01-01 10:12:16 +1030 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-01-01 10:12:16 +1030 |
commit | 96b8d4c19d797200b973caab57ca842531184c13 (patch) | |
tree | 470d2388fa88558804d68d1e5e962c3d60f03b38 /arch/avr32 | |
parent | 165ac433fa3f01ba99b29972f3adc283d03b0f17 (diff) | |
download | kernel_samsung_crespo-96b8d4c19d797200b973caab57ca842531184c13.zip kernel_samsung_crespo-96b8d4c19d797200b973caab57ca842531184c13.tar.gz kernel_samsung_crespo-96b8d4c19d797200b973caab57ca842531184c13.tar.bz2 |
avr32: define __fls
Like fls, but can't be handed 0 and returns the bit number.
(I broke this arch in linux-next by using __fls in generic code).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/avr32')
-rw-r--r-- | arch/avr32/include/asm/bitops.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/avr32/include/asm/bitops.h b/arch/avr32/include/asm/bitops.h index 1a50b69..f7dd5f7 100644 --- a/arch/avr32/include/asm/bitops.h +++ b/arch/avr32/include/asm/bitops.h @@ -263,6 +263,11 @@ static inline int fls(unsigned long word) return 32 - result; } +static inline int __fls(unsigned long word) +{ + return fls(word) - 1; +} + unsigned long find_first_zero_bit(const unsigned long *addr, unsigned long size); unsigned long find_next_zero_bit(const unsigned long *addr, |