diff options
| -rw-r--r-- | crypto/tgr192.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/tgr192.c b/crypto/tgr192.c index 022d3dd76c3b..f8e1d9f9938f 100644 --- a/crypto/tgr192.c +++ b/crypto/tgr192.c | |||
| @@ -25,8 +25,9 @@ | |||
| 25 | #include <linux/init.h> | 25 | #include <linux/init.h> |
| 26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
| 27 | #include <linux/mm.h> | 27 | #include <linux/mm.h> |
| 28 | #include <asm/byteorder.h> | ||
| 29 | #include <linux/types.h> | 28 | #include <linux/types.h> |
| 29 | #include <asm/byteorder.h> | ||
| 30 | #include <asm/unaligned.h> | ||
| 30 | 31 | ||
| 31 | #define TGR192_DIGEST_SIZE 24 | 32 | #define TGR192_DIGEST_SIZE 24 |
| 32 | #define TGR160_DIGEST_SIZE 20 | 33 | #define TGR160_DIGEST_SIZE 20 |
| @@ -468,10 +469,9 @@ static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data) | |||
| 468 | u64 a, b, c, aa, bb, cc; | 469 | u64 a, b, c, aa, bb, cc; |
| 469 | u64 x[8]; | 470 | u64 x[8]; |
| 470 | int i; | 471 | int i; |
| 471 | const __le64 *ptr = (const __le64 *)data; | ||
| 472 | 472 | ||
| 473 | for (i = 0; i < 8; i++) | 473 | for (i = 0; i < 8; i++) |
| 474 | x[i] = le64_to_cpu(ptr[i]); | 474 | x[i] = get_unaligned_le64(data + i * sizeof(__le64)); |
| 475 | 475 | ||
| 476 | /* save */ | 476 | /* save */ |
| 477 | a = aa = tctx->a; | 477 | a = aa = tctx->a; |
