blob: fd0255099aa279222b0a7a2b72c09ce1a3ff202c [file] [log] [blame]
Mike Frysinger3adc1fd2010-01-21 05:01:14 -05001#ifndef _GENERIC_UNALIGNED_H
2#define _GENERIC_UNALIGNED_H
3
4#include <asm/byteorder.h>
5
6#include <linux/unaligned/le_byteshift.h>
7#include <linux/unaligned/be_byteshift.h>
8#include <linux/unaligned/generic.h>
9
10/*
11 * Select endianness
12 */
13#if defined(__LITTLE_ENDIAN)
14#define get_unaligned __get_unaligned_le
15#define put_unaligned __put_unaligned_le
16#elif defined(__BIG_ENDIAN)
17#define get_unaligned __get_unaligned_be
18#define put_unaligned __put_unaligned_be
19#else
20#error invalid endian
21#endif
22
23#endif