diff options
Diffstat (limited to 'arch/x86/kernel/early_printk.c')
-rw-r--r-- | arch/x86/kernel/early_printk.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c index 9b9f18b49918..d15f575a861b 100644 --- a/arch/x86/kernel/early_printk.c +++ b/arch/x86/kernel/early_printk.c | |||
@@ -169,25 +169,9 @@ static struct console early_serial_console = { | |||
169 | .index = -1, | 169 | .index = -1, |
170 | }; | 170 | }; |
171 | 171 | ||
172 | /* Direct interface for emergencies */ | ||
173 | static struct console *early_console = &early_vga_console; | ||
174 | static int __initdata early_console_initialized; | ||
175 | |||
176 | asmlinkage void early_printk(const char *fmt, ...) | ||
177 | { | ||
178 | char buf[512]; | ||
179 | int n; | ||
180 | va_list ap; | ||
181 | |||
182 | va_start(ap, fmt); | ||
183 | n = vscnprintf(buf, sizeof(buf), fmt, ap); | ||
184 | early_console->write(early_console, buf, n); | ||
185 | va_end(ap); | ||
186 | } | ||
187 | |||
188 | static inline void early_console_register(struct console *con, int keep_early) | 172 | static inline void early_console_register(struct console *con, int keep_early) |
189 | { | 173 | { |
190 | if (early_console->index != -1) { | 174 | if (con->index != -1) { |
191 | printk(KERN_CRIT "ERROR: earlyprintk= %s already used\n", | 175 | printk(KERN_CRIT "ERROR: earlyprintk= %s already used\n", |
192 | con->name); | 176 | con->name); |
193 | return; | 177 | return; |
@@ -207,9 +191,8 @@ static int __init setup_early_printk(char *buf) | |||
207 | if (!buf) | 191 | if (!buf) |
208 | return 0; | 192 | return 0; |
209 | 193 | ||
210 | if (early_console_initialized) | 194 | if (early_console) |
211 | return 0; | 195 | return 0; |
212 | early_console_initialized = 1; | ||
213 | 196 | ||
214 | keep = (strstr(buf, "keep") != NULL); | 197 | keep = (strstr(buf, "keep") != NULL); |
215 | 198 | ||