X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=kernel%2Fprintk.c;h=8451dfc31d25b4e0e6903e84a55de230fb5363e2;hb=cb00e99c0abd844b884c64c6b54aa3b7d345ebb1;hp=bd2cd062878d6fb1f4b40895ddee7dbe9f9468da;hpb=0ae842eaf9512d9c9479797083750c077fc7d1f8;p=sagit-ice-cold%2Fkernel_xiaomi_msm8998.git diff --git a/kernel/printk.c b/kernel/printk.c index bd2cd062878d..8451dfc31d25 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -1083,6 +1083,19 @@ int unregister_console(struct console *console) } EXPORT_SYMBOL(unregister_console); +static int __init disable_boot_consoles(void) +{ + if (console_drivers != NULL) { + if (console_drivers->flags & CON_BOOT) { + printk(KERN_INFO "turn off boot console %s%d\n", + console_drivers->name, console_drivers->index); + return unregister_console(console_drivers); + } + } + return 0; +} +late_initcall(disable_boot_consoles); + /** * tty_write_message - write a message to a certain tty, not just the console. * @tty: the destination tty_struct