seabios: acpi: move out endian conversion helper function.
authorIsaku Yamahata <yamahata@valinux.co.jp>
Tue, 20 Jul 2010 07:37:16 +0000 (16:37 +0900)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 24 Jul 2010 17:30:03 +0000 (13:30 -0400)
move out cpu_to_le{32, 16} from acpi.c to util.h.
Those will be used by other files later.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
src/acpi.c
src/util.h

index 05594430cb378d518d4a0bd550f3c5613d57fad0..8de2696c57b2beb36fa6f8348d028fa655ec031c 100644 (file)
@@ -270,16 +270,6 @@ struct srat_memory_affinity
 
 #include "acpi-dsdt.hex"
 
-static inline u16 cpu_to_le16(u16 x)
-{
-    return x;
-}
-
-static inline u32 cpu_to_le32(u32 x)
-{
-    return x;
-}
-
 static void
 build_header(struct acpi_table_header *h, u32 sig, int len, u8 rev)
 {
index 92b3e5c9ca5c00ca281a3da89208e694ff5fa896..6c08a3c6ef074cf6d7bfb926c8acd4ce67e3d79f 100644 (file)
@@ -110,6 +110,16 @@ static inline u32 __htonl(u32 val) {
 #define htons(x) __htons_constant(x)
 #define ntohs(x) htons(x)
 
+static inline u16 cpu_to_le16(u16 x)
+{
+    return x;
+}
+
+static inline u32 cpu_to_le32(u32 x)
+{
+    return x;
+}
+
 static inline u32 getesp(void) {
     u32 esp;
     asm("movl %%esp, %0" : "=rm"(esp));