Skip to contentSkip to conversation

xtensa: introduce swab.h

PATCH New Harvey Harrison 1 participant 1 message Jan 7, 2009 Tensilica Xtensa port (xtensa)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xtensa: introduce swab.h

Fixes compile breakage as linux/byteorder.h was removed.

---
Fallout from the byteorder.h removal.

 arch/xtensa/include/asm/Kbuild                  |    2 +
 arch/xtensa/include/asm/byteorder.h             |   94 ++++-------------------
 arch/xtensa/include/asm/{byteorder.h => swab.h} |   18 +----
 3 files changed, 20 insertions(+), 94 deletions(-)
arch/xtensa/include/asm/Kbuild +2 -0
index c68e168..58c02a4 100644
@@ -1 +1,3 @@
 include include/asm-generic/Kbuild.asm
+
+unifdef-y += swab.h
arch/xtensa/include/asm/byteorder.h +14 -80

94 lines not on this page · raw message

arch/xtensa/include/asm/swab.h renamed from arch/xtensa/include/asm/byteorder.h +4 -14
similarity index 86%
rename from arch/xtensa/include/asm/byteorder.h
rename to arch/xtensa/include/asm/swab.h
index 07d10ad..f50b697 100644
@@ -1,5 +1,5 @@
 /*
- * include/asm-xtensa/byteorder.h
+ * include/asm-xtensa/swab.h
  *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file "COPYING" in the main directory of this archive
@@ -8,20 +8,12 @@
  * Copyright (C) 2001 - 2005 Tensilica Inc.
  */
 
-#ifndef _XTENSA_BYTEORDER_H
-#define _XTENSA_BYTEORDER_H
+#ifndef _XTENSA_SWAB_H
+#define _XTENSA_SWAB_H
 
 #include <asm/types.h>
 #include <linux/compiler.h>
 
-#ifdef __XTENSA_EL__
-# define __LITTLE_ENDIAN
-#elif defined(__XTENSA_EB__)
-# define __BIG_ENDIAN
-#else
-# error processor byte order undefined!
-#endif
-
 #define __SWAB_64_THRU_32__
 
 static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
@@ -75,6 +67,4 @@ static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
 }
 #define __arch_swab16 __arch_swab16
 
-#include <linux/byteorder.h>
-
-#endif /* _XTENSA_BYTEORDER_H */
+#endif /* _XTENSA_SWAB_H */
Signature · 1 line
1.6.1.94.g9388