From c1d1bfa583ee8cb9073eba05f718b33c33c06296 Mon Sep 17 00:00:00 2001 From: Simon Kagstrom Date: Mon, 24 Aug 2009 09:10:12 +0200 Subject: Define ffs/fls for all architectures UBIFS requires fls(), which is not defined for arm (and some other architectures) and this patch adds it. The implementation is taken from Linux and is generic. ffs() is also defined for those that miss it. Signed-off-by: Simon Kagstrom --- include/asm-nios2/bitops.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/asm-nios2') diff --git a/include/asm-nios2/bitops.h b/include/asm-nios2/bitops.h index e6c1a85..b01a89d 100644 --- a/include/asm-nios2/bitops.h +++ b/include/asm-nios2/bitops.h @@ -33,5 +33,6 @@ extern int test_and_set_bit(int nr, volatile void * a); extern int test_and_change_bit(int nr, volatile void * addr); extern int test_bit(int nr, volatile void * a); extern int ffs(int i); +#define ffs #endif /* __ASM_NIOS2_BITOPS_H */ -- cgit v1.1