[U-Boot] [PATCH 5/8]: Use do_div from div64.h for vsprintf

Simon Kagstrom simon.kagstrom at netinsight.net
Tue Jul 7 15:59:27 CEST 2009


Signed-off-by: Simon Kagstrom <simon.kagstrom at netinsight.net>
---
 lib_generic/vsprintf.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)

diff --git a/lib_generic/vsprintf.c b/lib_generic/vsprintf.c
index 7f534c7..e84cfb0 100644
--- a/lib_generic/vsprintf.c
+++ b/lib_generic/vsprintf.c
@@ -13,6 +13,7 @@
 #include <linux/types.h>
 #include <linux/string.h>
 #include <linux/ctype.h>
+#include <div64.h>
 
 #include <common.h>
 #if !defined (CONFIG_PANIC_HANG)
@@ -28,12 +29,6 @@ extern int do_reset (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
 #endif
 #define noinline __attribute__((noinline))
 
-#define do_div(n, base) ({ \
-	unsigned int __res; \
-	__res = ((unsigned NUM_TYPE) n) % base; \
-	n = ((unsigned NUM_TYPE) n) / base; \
-	__res; \
-})
 
 const char hex_asc[] = "0123456789abcdef";
 #define hex_asc_lo(x)   hex_asc[((x) & 0x0f)]
-- 
1.6.0.4



More information about the U-Boot mailing list