console: move console_init() out of tty_io.c
All the console driver handling code lives in printk.c. Move console_init() there as well so console support can still be used when the TTY code is configured out. No logical changes from this patch. Signed-off-by: Nicolas Pitre <nico@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
72f1b85a04
commit
0c688614dc
@@ -2610,6 +2610,30 @@ int unregister_console(struct console *console)
|
||||
}
|
||||
EXPORT_SYMBOL(unregister_console);
|
||||
|
||||
/*
|
||||
* Initialize the console device. This is called *early*, so
|
||||
* we can't necessarily depend on lots of kernel help here.
|
||||
* Just do some early initializations, and do the complex setup
|
||||
* later.
|
||||
*/
|
||||
void __init console_init(void)
|
||||
{
|
||||
initcall_t *call;
|
||||
|
||||
/* Setup the default TTY line discipline. */
|
||||
n_tty_init();
|
||||
|
||||
/*
|
||||
* set up the console device so that later boot sequences can
|
||||
* inform about problems etc..
|
||||
*/
|
||||
call = __con_initcall_start;
|
||||
while (call < __con_initcall_end) {
|
||||
(*call)();
|
||||
call++;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Some boot consoles access data that is in the init section and which will
|
||||
* be discarded after the initcalls have been run. To make sure that no code
|
||||
|
Reference in New Issue
Block a user