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>
diff --git a/include/asm-sh/bitops.h b/include/asm-sh/bitops.h
index 410fba4..95167bd 100644
--- a/include/asm-sh/bitops.h
+++ b/include/asm-sh/bitops.h
@@ -146,6 +146,8 @@
}
return r;
}
+#define ffs
+
#endif /* __KERNEL__ */
#endif /* __ASM_SH_BITOPS_H */