diff options
author | Sebastian Andrzej Siewior <bigeasy@linutronix.de> | 2017-11-30 09:16:31 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-15 20:27:44 +0100 |
commit | 6a28fd2bbc94bfca105632e5ef8a9dbe63ba0b39 (patch) | |
tree | cebd7b97d2018044f7720866ced47a1b871513c0 /drivers/tty/goldfish.c | |
parent | serial: 8250: 8250_omap: Fix spelling error. (diff) | |
download | linux-6a28fd2bbc94bfca105632e5ef8a9dbe63ba0b39.tar.xz linux-6a28fd2bbc94bfca105632e5ef8a9dbe63ba0b39.zip |
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>
Reviewed-by: Miodrag Dinic <miodrag.dinic@mips.com>
Acked-by: Miodrag Dinic <miodrag.dinic@mips.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/goldfish.c')
-rw-r--r-- | drivers/tty/goldfish.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/goldfish.c b/drivers/tty/goldfish.c index 7f657bb5113c..1c1bd0afcd48 100644 --- a/drivers/tty/goldfish.c +++ b/drivers/tty/goldfish.c @@ -433,6 +433,7 @@ static int goldfish_tty_remove(struct platform_device *pdev) return 0; } +#ifdef CONFIG_GOLDFISH_TTY_EARLY_CONSOLE static void gf_early_console_putchar(struct uart_port *port, int ch) { __raw_writel(ch, port->membase); @@ -456,6 +457,7 @@ static int __init gf_earlycon_setup(struct earlycon_device *device, } OF_EARLYCON_DECLARE(early_gf_tty, "google,goldfish-tty", gf_earlycon_setup); +#endif static const struct of_device_id goldfish_tty_of_match[] = { { .compatible = "google,goldfish-tty", }, |