]> www.infradead.org Git - mtd-utils.git/commitdiff
Fix ubi-header.h to use userspace swab functions
authorJosh Boyer <jwboyer@gmail.com>
Wed, 21 Jun 2006 13:37:06 +0000 (08:37 -0500)
committerFrank Haverkamp <haver@vnet.ibm.com>
Tue, 31 Oct 2006 14:06:07 +0000 (15:06 +0100)
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
include/mtd/ubi-header.h

index 1b325a15c62242acb9eeab5638ea3d0fb8bcc28e..12ce1c9e5b5210a97ed68b9e6b32e7904c3c1aa3 100644 (file)
@@ -30,7 +30,7 @@
 #ifndef __UBI_HEADER_H__
 #define __UBI_HEADER_H__
 
-#include <asm/byteorder.h>
+#include <mtd_swab.h>
 
 /* The version of this UBI implementation */
 #define UBI_VERSION 1
@@ -104,14 +104,14 @@ typedef struct {
  * In this implementation UBI uses the big-endian format for on-flash integers.
  * The below are the corresponding endianess conversion macros.
  */
-#define cpu_to_ubi16(x) ((ubi16_t){__cpu_to_be16(x)})
-#define ubi16_to_cpu(x) ((uint16_t)__be16_to_cpu((x).int16))
+#define cpu_to_ubi16(x) ((ubi16_t){cpu_to_be16(x)})
+#define ubi16_to_cpu(x) ((uint16_t)be16_to_cpu((x).int16))
 
-#define cpu_to_ubi32(x) ((ubi32_t){__cpu_to_be32(x)})
-#define ubi32_to_cpu(x) ((uint32_t)__be32_to_cpu((x).int32))
+#define cpu_to_ubi32(x) ((ubi32_t){cpu_to_be32(x)})
+#define ubi32_to_cpu(x) ((uint32_t)be32_to_cpu((x).int32))
 
-#define cpu_to_ubi64(x) ((ubi64_t){__cpu_to_be64(x)})
-#define ubi64_to_cpu(x) ((uint64_t)__be64_to_cpu((x).int64))
+#define cpu_to_ubi64(x) ((ubi64_t){cpu_to_be64(x)})
+#define ubi64_to_cpu(x) ((uint64_t)be64_to_cpu((x).int64))
 
 /*
  * Sizes of UBI headers.