Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e85c9d67 authored by Chunyan Zhang's avatar Chunyan Zhang Committed by Greg Kroah-Hartman
Browse files

serial: sprd: add console_initcall in sprd's uart driver



Use console_initcall to save the console index we selected on the
command line to sprd_console before probe finished. Thus we can
make different processes to the uart devices during initialization
according to whether it is used for console.

Signed-off-by: default avatarChunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: default avatarChunyan Zhang <zhang.lyra@gmail.com>
Reviewed-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Tested-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Link: https://lore.kernel.org/r/20190826072929.7696-3-zhang.lyra@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 99038fe7
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1016,6 +1016,13 @@ static struct console sprd_console = {
	.data = &sprd_uart_driver,
};

static int __init sprd_serial_console_init(void)
{
	register_console(&sprd_console);
	return 0;
}
console_initcall(sprd_serial_console_init);

#define SPRD_CONSOLE	(&sprd_console)

/* Support for earlycon */