mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
early_printk: consolidate random copies of identical code
The early console implementations are the same all over the place. Move the print function to kernel/printk and get rid of the copies. [[email protected]: arch/mips/kernel/early_printk.c needs kernel.h for va_list] [[email protected]: sh4: make the bios early console support depend on EARLY_PRINTK] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Cc: Russell King <[email protected]> Acked-by: Mike Frysinger <[email protected]> Cc: Michal Simek <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Paul Mundt <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Chris Metcalf <[email protected]> Cc: Richard Weinberger <[email protected]> Reviewed-by: Ingo Molnar <[email protected]> Tested-by: Paul Gortmaker <[email protected]> Cc: Geert Uytterhoeven <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
07c65f4d1a
commit
d0380e6c3c
13 changed files with 63 additions and 109 deletions
|
|
@ -16,7 +16,7 @@ static void early_console_write(struct console *con, const char *s, unsigned int
|
|||
um_early_printk(s, n);
|
||||
}
|
||||
|
||||
static struct console early_console = {
|
||||
static struct console early_console_dev = {
|
||||
.name = "earlycon",
|
||||
.write = early_console_write,
|
||||
.flags = CON_BOOT,
|
||||
|
|
@ -25,8 +25,10 @@ static struct console early_console = {
|
|||
|
||||
static int __init setup_early_printk(char *buf)
|
||||
{
|
||||
register_console(&early_console);
|
||||
|
||||
if (!early_console) {
|
||||
early_console = &early_console_dev;
|
||||
register_console(&early_console_dev);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue