Skip to contentSkip to conversation

tty: serial_core: Export uart_console_device so it can be used by modules

PATCH In review John Stultz 2 participants 3 messages Jan 7, 2020 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 tty: serial_core: Export uart_console_device so it can be used by modules

In order to support serial console w/ SERIAL_QCOM_GENI=m, we need to export the uart_console_device() symbol so things will build

Cc Todd Kjos <[email protected]>
Cc Alistair Delva <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc Amit Pundir <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Jiri Slaby <[email protected]>
---
 drivers/tty/serial/serial_core.c | 1 +
 1 file changed, 1 insertion(+)
drivers/tty/serial/serial_core.c +1 -0
index 7c2782785736..7b87c08f5bcb 100644
@@ -2603,6 +2603,7 @@ struct tty_driver *uart_console_device(struct console *co, int *index)
 	*index = co->index;
 	return p->tty_driver;
 }
+EXPORT_SYMBOL_GPL(uart_console_device);
 
 static ssize_t uart_get_attr_uartclk(struct device *dev,
 	struct device_attribute *attr, char *buf)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/2 tty: serial: Kconfig: Allow SERIAL_QCOM_GENI_CONSOLE to be enabled if SERIAL_QCOM_GENI is a module

In order to support having SERIAL_QCOM_GENI as a module while also still preserving serial console support, tweak the Kconfig requirements to not require =y

Cc Todd Kjos <[email protected]>
Cc Alistair Delva <[email protected]>
Cc Bjorn Andersson <[email protected]>
Cc Amit Pundir <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Jiri Slaby <[email protected]>
---
 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +1 -1
index 99f5da3bf913..4ca799198e88 100644
@@ -975,7 +975,7 @@ config SERIAL_QCOM_GENI
 
 config SERIAL_QCOM_GENI_CONSOLE
 	bool "QCOM GENI Serial Console support"
-	depends on SERIAL_QCOM_GENI=y
+	depends on SERIAL_QCOM_GENI
 	select SERIAL_CORE_CONSOLE
 	select SERIAL_EARLYCON
 	help
Signature · 1 line
2.17.1
Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] tty: serial: Kconfig: Allow SERIAL_QCOM_GENI_CONSOLE to be enabled if SERIAL_QCOM_GENI is a module

Quoted 7 lines · John Stultz

In order to support having SERIAL_QCOM_GENI as a module while also still preserving serial console support, tweak the Kconfig requirements to not require =y

Cc Todd Kjos <[email protected]>
Cc Alistair Delva <[email protected]>
Cc Bjorn Andersson <[email protected]>
Quoted 25 lines
Cc Amit Pundir <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Jiri Slaby <[email protected]>
---
 drivers/tty/serial/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/tty/serial/Kconfig +1 -1
index 99f5da3bf913..4ca799198e88 100644
@@ -975,7 +975,7 @@ config SERIAL_QCOM_GENI
 
 config SERIAL_QCOM_GENI_CONSOLE
 	bool "QCOM GENI Serial Console support"
-	depends on SERIAL_QCOM_GENI=y
+	depends on SERIAL_QCOM_GENI
 	select SERIAL_CORE_CONSOLE
 	select SERIAL_EARLYCON
 	help
Signature · 1 line
2.17.1