summaryrefslogtreecommitdiff
path: root/include/asm-m68k
diff options
context:
space:
mode:
authorSimon Kagstrom <simon.kagstrom@netinsight.net>2009-08-24 09:10:12 +0200
committerTom Rix <Tom.Rix@windriver.com>2009-10-03 09:04:26 -0500
commitc1d1bfa583ee8cb9073eba05f718b33c33c06296 (patch)
tree5f0f0f2a5d7b204c5228565f87083e5e58edd469 /include/asm-m68k
parentf83ab09566980fef4a3b37f6128b96b2bf91412a (diff)
downloadu-boot-imx-c1d1bfa583ee8cb9073eba05f718b33c33c06296.zip
u-boot-imx-c1d1bfa583ee8cb9073eba05f718b33c33c06296.tar.gz
u-boot-imx-c1d1bfa583ee8cb9073eba05f718b33c33c06296.tar.bz2
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 <simon.kagstrom@netinsight.net>
Diffstat (limited to 'include/asm-m68k')
-rw-r--r--include/asm-m68k/bitops.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/asm-m68k/bitops.h b/include/asm-m68k/bitops.h
index 0f9e8ab..e0c35fa 100644
--- a/include/asm-m68k/bitops.h
+++ b/include/asm-m68k/bitops.h
@@ -51,6 +51,7 @@ extern __inline__ int ffs(int x)
return r;
}
#define __ffs(x) (ffs(x) - 1)
+#define ffs
#endif /* __KERNEL__ */