aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/printf.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2010-08-02 05:17:31 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2010-08-02 18:51:56 -0400
commitf4ed2877b16e8146427306aea8819adac5c88374 (patch)
tree9451d9e5bb300634b00c25bd0ab155a1854e4223 /arch/x86/boot/printf.c
parent22a57f5896df218356bae6203dfaf04bcfd6c88c (diff)
x86, setup: reorganize the early console setup
Separate early_serial_console from tty.c This allows for reuse of early_serial_console.c/string.c/printf.c/cmdline.c in boot/compressed/. -v2: according to hpa, don't include string.c etc -v3: compressed/misc.c must have early_serial_base as static, so move it back to tty.c for setup code Signed-off-by: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <4C568D2B.205@kernel.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/boot/printf.c')
-rw-r--r--arch/x86/boot/printf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/boot/printf.c b/arch/x86/boot/printf.c
index 50e47cdbddd..cdac91ca55d 100644
--- a/arch/x86/boot/printf.c
+++ b/arch/x86/boot/printf.c
@@ -34,7 +34,7 @@ static int skip_atoi(const char **s)
34#define SMALL 32 /* Must be 32 == 0x20 */ 34#define SMALL 32 /* Must be 32 == 0x20 */
35#define SPECIAL 64 /* 0x */ 35#define SPECIAL 64 /* 0x */
36 36
37#define do_div(n,base) ({ \ 37#define __do_div(n, base) ({ \
38int __res; \ 38int __res; \
39__res = ((unsigned long) n) % (unsigned) base; \ 39__res = ((unsigned long) n) % (unsigned) base; \
40n = ((unsigned long) n) / (unsigned) base; \ 40n = ((unsigned long) n) / (unsigned) base; \
@@ -83,7 +83,7 @@ static char *number(char *str, long num, int base, int size, int precision,
83 tmp[i++] = '0'; 83 tmp[i++] = '0';
84 else 84 else
85 while (num != 0) 85 while (num != 0)
86 tmp[i++] = (digits[do_div(num, base)] | locase); 86 tmp[i++] = (digits[__do_div(num, base)] | locase);
87 if (i > precision) 87 if (i > precision)
88 precision = i; 88 precision = i;
89 size -= precision; 89 size -= precision;