diff options
author | Harvey Harrison <[email protected]> | 2008-06-05 22:46:19 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2008-06-06 11:29:10 -0700 |
commit | 3527fb326f07bc8e85cf66d4f987ebeea24e8e4a (patch) | |
tree | c0f0389b67f15778808a72fe8b197a4d8c250030 | |
parent | f2eb432715a81a703e626df59347ba3557009557 (diff) |
lib: export bitrev16
Bluetooth will be able to use this.
Signed-off-by: Harvey Harrison <[email protected]>
Cc: Marcel Holtmann <[email protected]>
Cc: Dave Young <[email protected]>
Cc: Akinobu Mita <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | include/linux/bitrev.h | 1 | ||||
-rw-r--r-- | lib/bitrev.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/bitrev.h b/include/linux/bitrev.h index 05e540d6963a..7ffe03f4693d 100644 --- a/include/linux/bitrev.h +++ b/include/linux/bitrev.h @@ -10,6 +10,7 @@ static inline u8 bitrev8(u8 byte) return byte_rev_table[byte]; } +extern u16 bitrev16(u16 in); extern u32 bitrev32(u32 in); #endif /* _LINUX_BITREV_H */ 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] = { }; EXPORT_SYMBOL_GPL(byte_rev_table); -static __always_inline u16 bitrev16(u16 x) +u16 bitrev16(u16 x) { return (bitrev8(x & 0xff) << 8) | bitrev8(x >> 8); } +EXPORT_SYMBOL(bitrev16); /** * bitrev32 - reverse the order of bits in a u32 value |