]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
types.h: move and redefine resource_size_t
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 28 Jun 2016 01:48:40 +0000 (10:48 +0900)
committerTom Rini <trini@konsulko.com>
Thu, 14 Jul 2016 22:22:24 +0000 (18:22 -0400)
Currently, this is only defined in arch/arm/include/asm/types.h,
so move it to include/linux/types.h to make it available for all
architectures.

I defined it with phys_addr_t as Linux does.  I needed to surround
the define with #ifdef __KERNEL__ ... #endif to avoid build errors
in tools building.  (Host tools should not include <linux/types.h>
in the first place, but this is already messy in U-Boot...)

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/include/asm/types.h
include/linux/types.h

index d108915ff5c1e1accc0f4d80be10921707dea667..9af7353f0866f05dbe298a603d52d90e9c8e6d28 100644 (file)
@@ -71,5 +71,4 @@ typedef u32 dma_addr_t;
 
 #endif /* __KERNEL__ */
 
-typedef unsigned long resource_size_t;
 #endif
index 6f75be4253786888b7717febfadc74a22afb29d3..416fa6628482d8cb5afa356df2f3e34f2411fa8d 100644 (file)
@@ -124,6 +124,10 @@ typedef            __UINT64_TYPE__ u_int64_t;
 typedef                __INT64_TYPE__          int64_t;
 #endif
 
+#ifdef __KERNEL__
+typedef phys_addr_t resource_size_t;
+#endif
+
 /*
  * Below are truly Linux-specific types that should never collide with
  * any application/library that wants linux/types.h.