diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-17 17:22:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-02-17 17:22:59 -0500 |
commit | 23beafbe3abd3f622931e83ef4e6b17642cf408e (patch) | |
tree | 142283fe372f1527b82662e00c360ae47cca87a0 | |
parent | 48c0d9ece360ff6001e2ae36aa9b34446d0388a8 (diff) | |
parent | 8eb2dfac41c71701bb741f496f0cb7b7e4a3c3f6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
crypto: lrw - Fix big endian support
-rw-r--r-- | crypto/lrw.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/crypto/lrw.c b/crypto/lrw.c index 8ef664e3bcd9..358f80be2bf9 100644 --- a/crypto/lrw.c +++ b/crypto/lrw.c | |||
@@ -45,7 +45,13 @@ struct priv { | |||
45 | 45 | ||
46 | static inline void setbit128_bbe(void *b, int bit) | 46 | static inline void setbit128_bbe(void *b, int bit) |
47 | { | 47 | { |
48 | __set_bit(bit ^ 0x78, b); | 48 | __set_bit(bit ^ (0x80 - |
49 | #ifdef __BIG_ENDIAN | ||
50 | BITS_PER_LONG | ||
51 | #else | ||
52 | BITS_PER_BYTE | ||
53 | #endif | ||
54 | ), b); | ||
49 | } | 55 | } |
50 | 56 | ||
51 | static int setkey(struct crypto_tfm *parent, const u8 *key, | 57 | static int setkey(struct crypto_tfm *parent, const u8 *key, |