OSDN Git Service

FROMLIST: tty: goldfish: Enable 'earlycon' only if built-in
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 30 Nov 2017 08:16:31 +0000 (09:16 +0100)
committerGreg Kroah-Hartman <gregkh@google.com>
Mon, 5 Feb 2018 16:58:37 +0000 (08:58 -0800)
commit8c74f4c80eb5e8cbc0a985a46353d57d2bab36a8
treeed85bd6b7b302f48fafe7119ffc9213e46bdd7e3
parent0bc65cbcc33545f1718ea8a98272be931780271b
FROMLIST: tty: goldfish: Enable 'earlycon' only if built-in

Commit 3840ed9548f7 ("tty: goldfish: Implement support for kernel
'earlycon' parameter") breaks an allmodconfig config on x86:
|  LD      vmlinux.o
|  MODPOST vmlinux.o
|drivers/tty/serial/earlycon.o: In function `parse_options':
|drivers/tty/serial/earlycon.c:97: undefined reference to `uart_parse_earlycon'
|Makefile:1005: recipe for target 'vmlinux' failed

earlycon.c::parse_options() invokes uart_parse_earlycon() from serial_core.c
which is compiled=m because GOLDFISH_TTY itself (and most others) are =m.
To avoid that, I'm adding the _CONSOLE config option which is selected if the
GOLDFISH module itself is =y since it doesn't need the early bits for the =m
case (other drivers do the same dance).
The alternative would be to move uart_parse_earlycon() from
serial_core.c to earlycon.c (we don't have that many users of that
function).

Fixes: 3840ed9548f7 ("tty: goldfish: Implement support for kernel
       'earlycon' parameter")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
(cherry picked from: https://patchwork.kernel.org/patch/10084429/)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/tty/Kconfig
drivers/tty/goldfish.c