diff options
| -rw-r--r-- | include/linux/byteorder/Kbuild | 6 | ||||
| -rw-r--r-- | include/linux/byteorder/big_endian.h | 2 | ||||
| -rw-r--r-- | include/linux/byteorder/generic.h | 8 | ||||
| -rw-r--r-- | include/linux/byteorder/little_endian.h | 2 |
4 files changed, 6 insertions, 12 deletions
diff --git a/include/linux/byteorder/Kbuild b/include/linux/byteorder/Kbuild index 79bedddfd9ca..1133d5f9d818 100644 --- a/include/linux/byteorder/Kbuild +++ b/include/linux/byteorder/Kbuild | |||
| @@ -1,5 +1,3 @@ | |||
| 1 | header-y += big_endian.h | 1 | unifdef-y += big_endian.h |
| 2 | header-y += little_endian.h | 2 | unifdef-y += little_endian.h |
| 3 | |||
| 4 | unifdef-y += generic.h | ||
| 5 | unifdef-y += swab.h | 3 | unifdef-y += swab.h |
diff --git a/include/linux/byteorder/big_endian.h b/include/linux/byteorder/big_endian.h index bef87891cb24..961ed4b48d8e 100644 --- a/include/linux/byteorder/big_endian.h +++ b/include/linux/byteorder/big_endian.h | |||
| @@ -101,6 +101,8 @@ static inline __u16 __be16_to_cpup(const __be16 *p) | |||
| 101 | #define __cpu_to_be16s(x) do {} while (0) | 101 | #define __cpu_to_be16s(x) do {} while (0) |
| 102 | #define __be16_to_cpus(x) do {} while (0) | 102 | #define __be16_to_cpus(x) do {} while (0) |
| 103 | 103 | ||
| 104 | #ifdef __KERNEL__ | ||
| 104 | #include <linux/byteorder/generic.h> | 105 | #include <linux/byteorder/generic.h> |
| 106 | #endif | ||
| 105 | 107 | ||
| 106 | #endif /* _LINUX_BYTEORDER_BIG_ENDIAN_H */ | 108 | #endif /* _LINUX_BYTEORDER_BIG_ENDIAN_H */ |
diff --git a/include/linux/byteorder/generic.h b/include/linux/byteorder/generic.h index d3771551fdd9..0846e6b931ce 100644 --- a/include/linux/byteorder/generic.h +++ b/include/linux/byteorder/generic.h | |||
| @@ -82,12 +82,6 @@ | |||
| 82 | * | 82 | * |
| 83 | */ | 83 | */ |
| 84 | 84 | ||
| 85 | |||
| 86 | #if defined(__KERNEL__) | ||
| 87 | /* | ||
| 88 | * inside the kernel, we can use nicknames; | ||
| 89 | * outside of it, we must avoid POSIX namespace pollution... | ||
| 90 | */ | ||
| 91 | #define cpu_to_le64 __cpu_to_le64 | 85 | #define cpu_to_le64 __cpu_to_le64 |
| 92 | #define le64_to_cpu __le64_to_cpu | 86 | #define le64_to_cpu __le64_to_cpu |
| 93 | #define cpu_to_le32 __cpu_to_le32 | 87 | #define cpu_to_le32 __cpu_to_le32 |
| @@ -176,6 +170,4 @@ static inline void be64_add_cpu(__be64 *var, u64 val) | |||
| 176 | *var = cpu_to_be64(be64_to_cpu(*var) + val); | 170 | *var = cpu_to_be64(be64_to_cpu(*var) + val); |
| 177 | } | 171 | } |
| 178 | 172 | ||
| 179 | #endif /* KERNEL */ | ||
| 180 | |||
| 181 | #endif /* _LINUX_BYTEORDER_GENERIC_H */ | 173 | #endif /* _LINUX_BYTEORDER_GENERIC_H */ |
diff --git a/include/linux/byteorder/little_endian.h b/include/linux/byteorder/little_endian.h index 86e62b750176..05dc7c35b3b2 100644 --- a/include/linux/byteorder/little_endian.h +++ b/include/linux/byteorder/little_endian.h | |||
| @@ -101,6 +101,8 @@ static inline __u16 __be16_to_cpup(const __be16 *p) | |||
| 101 | #define __cpu_to_be16s(x) __swab16s((x)) | 101 | #define __cpu_to_be16s(x) __swab16s((x)) |
| 102 | #define __be16_to_cpus(x) __swab16s((x)) | 102 | #define __be16_to_cpus(x) __swab16s((x)) |
| 103 | 103 | ||
| 104 | #ifdef __KERNEL__ | ||
| 104 | #include <linux/byteorder/generic.h> | 105 | #include <linux/byteorder/generic.h> |
| 106 | #endif | ||
| 105 | 107 | ||
| 106 | #endif /* _LINUX_BYTEORDER_LITTLE_ENDIAN_H */ | 108 | #endif /* _LINUX_BYTEORDER_LITTLE_ENDIAN_H */ |
