--- include/linux/mtd/compatmac.h.orig Mon Aug 30 09:17:28 2004 +++ include/linux/mtd/compatmac.h Mon Aug 30 11:22:18 2004 @@ -64,6 +64,22 @@ #include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) +/** + * * __ffs - find first bit in word. + * * @word: The word to search + * * + * * Undefined if no bit exists, so code should check against 0 first. + * */ +static inline unsigned long __ffs(unsigned long word) +{ + __asm__("bsfl %1,%0" + :"=r" (word) + :"rm" (word)); + return word; +} +#endif /* < 2.5.0 */ + #ifdef __rh_config_h__ #define sigmask_lock sighand->siglock #define sig sighand