From c3bda295eeb002ac708303350d5776c7fe01a127 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Mon, 2 Feb 2015 10:47:35 +0100 Subject: [PATCH] serial: samsung: earlycon support depends on CONFIG_SERIAL_SAMSUNG_CONSOLE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit EarlyCon support depends on serial console infrastructure, so the code implementing it should depend on CONFIG_SERIAL_SAMSUNG_CONSOLE. This patch fixes the following build break: CC [M] drivers/tty/serial/samsung.o drivers/tty/serial/samsung.c:2468:1: error: expected declaration specifiers or ‘...’ before string constant drivers/tty/serial/samsung.c:2468:1: error: expected declaration specifiers or ‘...’ before ‘s3c2410_setup_earlycon’ drivers/tty/serial/samsung.c:2487:1: error: expected declaration specifiers or ‘...’ before string constant drivers/tty/serial/samsung.c:2487:1: error: expected declaration specifiers or ‘...’ before ‘s3c2412_setup_earlycon’ drivers/tty/serial/samsung.c:2488:1: error: expected declaration specifiers or ‘...’ before string constant drivers/tty/serial/samsung.c:2488:1: error: expected declaration specifiers or ‘...’ before ‘s3c2440_setup_earlycon’ drivers/tty/serial/samsung.c:2489:1: error: expected declaration specifiers or ‘...’ before string constant drivers/tty/serial/samsung.c:2489:1: error: expected declaration specifiers or ‘...’ before ‘s3c6400_setup_earlycon’ drivers/tty/serial/samsung.c:2506:1: error: expected declaration specifiers or ‘...’ before string constant drivers/tty/serial/samsung.c:2506:1: error: expected declaration specifiers or ‘...’ before ‘s5pv210_setup_earlycon’ drivers/tty/serial/samsung.c:2507:1: error: expected declaration specifiers or ‘...’ before string constant drivers/tty/serial/samsung.c:2507:1: error: expected declaration specifiers or ‘...’ before ‘exynos4210_setup_earlycon’ drivers/tty/serial/samsung.c:2468:1: warning: ‘s3c2410_setup_earlycon’ defined but not used [-Wunused-function] drivers/tty/serial/samsung.c:2487:1: warning: ‘s3c2412_setup_earlycon’ defined but not used [-Wunused-function] drivers/tty/serial/samsung.c:2488:1: warning: ‘s3c2440_setup_earlycon’ defined but not used [-Wunused-function] drivers/tty/serial/samsung.c:2489:1: warning: ‘s3c6400_setup_earlycon’ defined but not used [-Wunused-function] drivers/tty/serial/samsung.c:2506:1: warning: ‘s5pv210_setup_earlycon’ defined but not used [-Wunused-function] drivers/tty/serial/samsung.c:2507:1: warning: ‘exynos4210_setup_earlycon’ defined but not used [-Wunused-function] make[3]: *** [drivers/tty/serial/samsung.o] Error 1 Reported-by: kbuild test robot Signed-off-by: Marek Szyprowski Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/samsung.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 236abae97613..af821a908720 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -2396,6 +2396,7 @@ static struct platform_driver samsung_serial_driver = { module_platform_driver(samsung_serial_driver); +#ifdef CONFIG_SERIAL_SAMSUNG_CONSOLE /* * Early console. */ @@ -2498,6 +2499,7 @@ OF_EARLYCON_DECLARE(exynos4210, "samsung,exynos4210-uart", s5pv210_early_console_setup); EARLYCON_DECLARE(s5pv210, s5pv210_early_console_setup); EARLYCON_DECLARE(exynos4210, s5pv210_early_console_setup); +#endif MODULE_ALIAS("platform:samsung-uart"); MODULE_DESCRIPTION("Samsung SoC Serial port driver"); -- GitLab