aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-06-06 01:46:19 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-06 14:29:10 -0400
commit3527fb326f07bc8e85cf66d4f987ebeea24e8e4a (patch)
treec0f0389b67f15778808a72fe8b197a4d8c250030 /lib
parentf2eb432715a81a703e626df59347ba3557009557 (diff)
lib: export bitrev16
Bluetooth will be able to use this. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Cc: Marcel Holtmann <marcel@holtmann.org> Cc: Dave Young <hidave.darkstar@gmail.com> Cc: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/bitrev.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/bitrev.c b/lib/bitrev.c
index 989aff73f881..3956203456d4 100644
--- a/lib/bitrev.c
+++ b/lib/bitrev.c
@@ -42,10 +42,11 @@ const u8 byte_rev_table[256] = {
42}; 42};
43EXPORT_SYMBOL_GPL(byte_rev_table); 43EXPORT_SYMBOL_GPL(byte_rev_table);
44 44
45static __always_inline u16 bitrev16(u16 x) 45u16 bitrev16(u16 x)
46{ 46{
47 return (bitrev8(x & 0xff) << 8) | bitrev8(x >> 8); 47 return (bitrev8(x & 0xff) << 8) | bitrev8(x >> 8);
48} 48}
49EXPORT_SYMBOL(bitrev16);
49 50
50/** 51/**
51 * bitrev32 - reverse the order of bits in a u32 value 52 * bitrev32 - reverse the order of bits in a u32 value