From 9ec9c430b3128410c5f20f3a9d52679808922465 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 25 Feb 2019 12:10:31 +0300 Subject: [PATCH] console: tty: Remove dependency on older "consoles" Console subsystem doesn't depend on older consoles-in-drivers, the only common thing between them is CONFIG_UART_CONSOLE_ON_DEV_NAME setting, so make it so (by depending on either UART_CONSOLE or CONSOLE_SUBSYS. Signed-off-by: Paul Sokolovsky --- drivers/console/Kconfig | 19 ++++++++++--------- subsys/console/tty.c | 2 -- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/console/Kconfig b/drivers/console/Kconfig index 9665fb0ca1f..eb4b22c040a 100644 --- a/drivers/console/Kconfig +++ b/drivers/console/Kconfig @@ -7,6 +7,16 @@ # SPDX-License-Identifier: Apache-2.0 # +# Setting shared by different subsystems +config UART_CONSOLE_ON_DEV_NAME + string "Device Name of UART Device for UART Console" + default "$(dt_str_val,DT_UART_CONSOLE_ON_DEV_NAME)" if HAS_DTS + default "UART_0" + depends on (UART_CONSOLE || CONSOLE_SUBSYS) + help + This option specifies the name of UART device to be used for + UART console. + menuconfig CONSOLE bool "Console drivers" @@ -41,15 +51,6 @@ config UART_CONSOLE Enable this option to use one UART for console. Make sure CONFIG_UART_CONSOLE_ON_DEV_NAME is also set correctly. -config UART_CONSOLE_ON_DEV_NAME - string "Device Name of UART Device for UART Console" - default "$(dt_str_val,DT_UART_CONSOLE_ON_DEV_NAME)" if HAS_DTS - default "UART_0" - depends on UART_CONSOLE - help - This option specifies the name of UART device to be used for - UART console. - config UART_CONSOLE_INIT_PRIORITY int "Init priority" default 60 diff --git a/subsys/console/tty.c b/subsys/console/tty.c index 41830c75fe8..f14762031ec 100644 --- a/subsys/console/tty.c +++ b/subsys/console/tty.c @@ -8,8 +8,6 @@ #include #include #include -#include -#include static int tty_irq_input_hook(struct tty_serial *tty, u8_t c); static int tty_putchar(struct tty_serial *tty, u8_t c);