serial: earlycon: Fixup earlycon console name and index
authorPeter Hurley <peter@hurleysoftware.com>
Sat, 16 Jan 2016 23:23:40 +0000 (15:23 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2016 06:07:37 +0000 (22:07 -0800)
commitcda64e68240265752c6db22a75f28707dfaf6563
treefa27f6b48e29da9b1375ec97fad04ea24087ac98
parent2eaa790989e03900298ad24f77f1086dbbc1aebd
serial: earlycon: Fixup earlycon console name and index

Properly initialize the struct console 'name' and 'index' fields for
the registering earlycon. For earlycons w/o trailing numerals, the
index is set to 0; otherwise, the index is set to the value of the
trailing numeral. For example, the 'exynos4210' earlycon name == "exynos"
and index == 4210. Earlycons with embedded numerals will have all
non-trailing numerals as part of the name; for example, the 's3c2412'
earlycon name == "s3c" and index == 2412.

This ackward scheme was initially added for the uart8250 earlycon;
adopt this scheme for the other earlycon "drivers".

Introduce earlycon_init() which performs the string scanning and
initializes the name and index fields; encapsulate the other console
field initializations within.

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/earlycon.c
This page took 0.026968 seconds and 5 git commands to generate.