diff options
-rw-r--r-- | include/asm-blackfin/unaligned.h | 1 | ||||
-rw-r--r-- | include/asm-generic/unaligned.h | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/include/asm-blackfin/unaligned.h b/include/asm-blackfin/unaligned.h new file mode 100644 index 0000000..6cecbbb --- /dev/null +++ b/include/asm-blackfin/unaligned.h @@ -0,0 +1 @@ +#include <asm-generic/unaligned.h> diff --git a/include/asm-generic/unaligned.h b/include/asm-generic/unaligned.h new file mode 100644 index 0000000..fd02550 --- /dev/null +++ b/include/asm-generic/unaligned.h @@ -0,0 +1,23 @@ +#ifndef _GENERIC_UNALIGNED_H +#define _GENERIC_UNALIGNED_H + +#include <asm/byteorder.h> + +#include <linux/unaligned/le_byteshift.h> +#include <linux/unaligned/be_byteshift.h> +#include <linux/unaligned/generic.h> + +/* + * Select endianness + */ +#if defined(__LITTLE_ENDIAN) +#define get_unaligned __get_unaligned_le +#define put_unaligned __put_unaligned_le +#elif defined(__BIG_ENDIAN) +#define get_unaligned __get_unaligned_be +#define put_unaligned __put_unaligned_be +#else +#error invalid endian +#endif + +#endif |