From aad708a3417e1b3b6edb8653ae7c30e289a50a2d Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Fri, 23 Mar 2012 23:34:38 +0200 Subject: [PATCH] compat: backport little-endian bitops [linux-2.6] (master)$ \ git describe --contains a56560b3b233238e85205d4e8d7bded904ac2306 v2.6.39-rc1~192 Signed-off-by: Vladimir Sokolovsky --- include/linux/compat-2.6.39.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/include/linux/compat-2.6.39.h b/include/linux/compat-2.6.39.h index 406f8eb..961e91c 100644 --- a/include/linux/compat-2.6.39.h +++ b/include/linux/compat-2.6.39.h @@ -164,6 +164,21 @@ int __must_check kstrtou8(const char *s, unsigned int base, u8 *res); int __must_check kstrtos8(const char *s, unsigned int base, s8 *res); #endif /* ifndef strict_strtol */ +static inline int test_bit_le(int nr, const void *addr) +{ + return test_bit(nr ^ BITOP_LE_SWIZZLE, addr); +} + +static inline void __set_bit_le(int nr, void *addr) +{ + __set_bit(nr ^ BITOP_LE_SWIZZLE, addr); +} + +static inline void __clear_bit_le(int nr, void *addr) +{ + __clear_bit(nr ^ BITOP_LE_SWIZZLE, addr); +} + #endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39)) */ #endif /* LINUX_26_39_COMPAT_H */ -- 2.46.0