printk: Move console matching logic into a separate function
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 13 Feb 2020 09:51:31 +0000 (10:51 +0100)
committerPetr Mladek <pmladek@suse.com>
Tue, 18 Feb 2020 08:33:48 +0000 (09:33 +0100)
commitad8cd1db80cc33337bdbee63c453ef6d5132474b
tree6d3155cfe7bf13530c3ee7c04c4ddc57133061ef
parenta4fe2b4d87c9f2298ae6a641a7a64bc941d079d0
printk: Move console matching logic into a separate function

This moves the loop that tries to match a newly registered console
with the command line or add_preferred_console list into a separate
helper, in order to be able to call it multiple times in subsequent
patches.

Link: https://lore.kernel.org/r/20200213095133.23176-2-pmladek@suse.com
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Signed-off-by: Petr Mladek <pmladek@suse.com>
kernel/printk/printk.c