diff options
Diffstat (limited to 'include/asm-h8300')
-rw-r--r-- | include/asm-h8300/unaligned.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/include/asm-h8300/unaligned.h b/include/asm-h8300/unaligned.h index ffb67f472070..b8d06c70c2da 100644 --- a/include/asm-h8300/unaligned.h +++ b/include/asm-h8300/unaligned.h | |||
@@ -1,15 +1,11 @@ | |||
1 | #ifndef __H8300_UNALIGNED_H | 1 | #ifndef _ASM_H8300_UNALIGNED_H |
2 | #define __H8300_UNALIGNED_H | 2 | #define _ASM_H8300_UNALIGNED_H |
3 | 3 | ||
4 | #include <linux/unaligned/be_memmove.h> | ||
5 | #include <linux/unaligned/le_byteshift.h> | ||
6 | #include <linux/unaligned/generic.h> | ||
4 | 7 | ||
5 | /* Use memmove here, so gcc does not insert a __builtin_memcpy. */ | 8 | #define get_unaligned __get_unaligned_be |
9 | #define put_unaligned __put_unaligned_be | ||
6 | 10 | ||
7 | #define get_unaligned(ptr) \ | 11 | #endif /* _ASM_H8300_UNALIGNED_H */ |
8 | ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; }) | ||
9 | |||
10 | #define put_unaligned(val, ptr) \ | ||
11 | ({ __typeof__(*(ptr)) __tmp = (val); \ | ||
12 | memmove((ptr), &__tmp, sizeof(*(ptr))); \ | ||
13 | (void)0; }) | ||
14 | |||
15 | #endif | ||