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

Signed-off-by: Benjamin Herrenschmidt <>
Reviewed-by: Sergey Senozhatsky <>
Reviewed-by: Petr Mladek <>
Signed-off-by: Petr Mladek <>
1 file changed