diff options
Diffstat (limited to 'lib/bitrev.c')
-rw-r--r-- | lib/bitrev.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/lib/bitrev.c b/lib/bitrev.c index 3956203456d4..40ffda94cc5d 100644 --- a/lib/bitrev.c +++ b/lib/bitrev.c | |||
@@ -1,3 +1,4 @@ | |||
1 | #ifndef CONFIG_HAVE_ARCH_BITREVERSE | ||
1 | #include <linux/types.h> | 2 | #include <linux/types.h> |
2 | #include <linux/module.h> | 3 | #include <linux/module.h> |
3 | #include <linux/bitrev.h> | 4 | #include <linux/bitrev.h> |
@@ -42,18 +43,4 @@ const u8 byte_rev_table[256] = { | |||
42 | }; | 43 | }; |
43 | EXPORT_SYMBOL_GPL(byte_rev_table); | 44 | EXPORT_SYMBOL_GPL(byte_rev_table); |
44 | 45 | ||
45 | u16 bitrev16(u16 x) | 46 | #endif /* CONFIG_HAVE_ARCH_BITREVERSE */ |
46 | { | ||
47 | return (bitrev8(x & 0xff) << 8) | bitrev8(x >> 8); | ||
48 | } | ||
49 | EXPORT_SYMBOL(bitrev16); | ||
50 | |||
51 | /** | ||
52 | * bitrev32 - reverse the order of bits in a u32 value | ||
53 | * @x: value to be bit-reversed | ||
54 | */ | ||
55 | u32 bitrev32(u32 x) | ||
56 | { | ||
57 | return (bitrev16(x & 0xffff) << 16) | bitrev16(x >> 16); | ||
58 | } | ||
59 | EXPORT_SYMBOL(bitrev32); | ||