Staging: Panel: panel: Fixed checkpatch line length warnings
[linux/fpc-iii.git] / arch / mips / kernel / early_printk.c
blob505cb77d12805c7d80610abea5c0919320d5ed61
1 /*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
6 * Copyright (C) 2002, 2003, 06, 07 Ralf Baechle (ralf@linux-mips.org)
7 * Copyright (C) 2007 MIPS Technologies, Inc.
8 * written by Ralf Baechle (ralf@linux-mips.org)
9 */
10 #include <linux/kernel.h>
11 #include <linux/console.h>
12 #include <linux/printk.h>
13 #include <linux/init.h>
15 #include <asm/setup.h>
17 extern void prom_putchar(char);
19 static void early_console_write(struct console *con, const char *s, unsigned n)
21 while (n-- && *s) {
22 if (*s == '\n')
23 prom_putchar('\r');
24 prom_putchar(*s);
25 s++;
29 static struct console early_console_prom = {
30 .name = "early",
31 .write = early_console_write,
32 .flags = CON_PRINTBUFFER | CON_BOOT,
33 .index = -1
36 void __init setup_early_printk(void)
38 if (early_console)
39 return;
40 early_console = &early_console_prom;
42 register_console(&early_console_prom);