Skip to content

Commit

Permalink
avr32: define __fls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rusty Russell committed Dec 31, 2008
1 parent 165ac43 commit 96b8d4c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/avr32/include/asm/bitops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 96b8d4c

Please sign in to comment.