summaryrefslogtreecommitdiff
path: root/fs/btrfs/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/hash.c')
-rw-r--r--fs/btrfs/hash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/hash.c b/fs/btrfs/hash.c
index f8a50e532a..cde3abd3df 100644
--- a/fs/btrfs/hash.c
+++ b/fs/btrfs/hash.c
@@ -8,6 +8,7 @@
#include "btrfs.h"
#include <u-boot/crc.h>
+#include <asm/unaligned.h>
static u32 btrfs_crc32c_table[256];
@@ -34,5 +35,5 @@ u32 btrfs_csum_data(char *data, u32 seed, size_t len)
void btrfs_csum_final(u32 crc, void *result)
{
- *((u32 *) result) = cpu_to_le32(~crc);
+ put_unaligned(cpu_to_le32(~crc), (u32 *)result);
}