summaryrefslogtreecommitdiff
path: root/include/libfdt_env.h
diff options
context:
space:
mode:
authorRichard Henderson <rth@twiddle.net>2013-01-04 16:39:26 -0800
committerBlue Swirl <blauwirbel@gmail.com>2013-01-12 12:22:58 +0000
commitfedb88bd32d331131d77a9b567d12e682fd102ac (patch)
treed198bbe0f4375dcd38d8f574490866bcf584a6c8 /include/libfdt_env.h
parentfedf2de31023b4ee71a4e578db013976243a8143 (diff)
downloadqemu-fedb88bd32d331131d77a9b567d12e682fd102ac.zip
fdt: Use bswapN instead of bswap_N
Fixes the libfdt enabled build for hosts that have <machine/bswap.h>. The code at the beginning of qemu/bswap.h is attempting to standardize on bswapN. In the case of CONFIG_MACHINE_BSWAP_H, this is all we get. In the case of CONFIG_BYTESWAP_H, we get bswap_N from the system header and then wrap these with inline functions to get bswapN. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'include/libfdt_env.h')
-rw-r--r--include/libfdt_env.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/libfdt_env.h b/include/libfdt_env.h
index 7938d73fae..3667d4cb3a 100644
--- a/include/libfdt_env.h
+++ b/include/libfdt_env.h
@@ -22,15 +22,15 @@
#include "qemu/bswap.h"
#ifdef HOST_WORDS_BIGENDIAN
-#define fdt32_to_cpu(x) (x)
-#define cpu_to_fdt32(x) (x)
-#define fdt64_to_cpu(x) (x)
-#define cpu_to_fdt64(x) (x)
+#define fdt32_to_cpu(x) (x)
+#define cpu_to_fdt32(x) (x)
+#define fdt64_to_cpu(x) (x)
+#define cpu_to_fdt64(x) (x)
#else
-#define fdt32_to_cpu(x) (bswap_32((x)))
-#define cpu_to_fdt32(x) (bswap_32((x)))
-#define fdt64_to_cpu(x) (bswap_64((x)))
-#define cpu_to_fdt64(x) (bswap_64((x)))
+#define fdt32_to_cpu(x) bswap32(x)
+#define cpu_to_fdt32(x) bswap32(x)
+#define fdt64_to_cpu(x) bswap64(x)
+#define cpu_to_fdt64(x) bswap64(x)
#endif
#endif /* _LIBFDT_ENV_H */