Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be90d66b authored by Avaneesh Kumar Dwivedi's avatar Avaneesh Kumar Dwivedi
Browse files

drivers: tty: serial: Conditionally disable console write



Disable console write effectively avoiding kernel logging
if suitable config option is enabled.

Change-Id: Idf89662edb7380de59f7c35dff78cb2b48f7a55a
Signed-off-by: default avatarAvaneesh Kumar Dwivedi <akdwived@codeaurora.org>
parent 906ec760
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1098,6 +1098,16 @@ config SERIAL_MSM_CONSOLE
	select SERIAL_CORE_CONSOLE
	select SERIAL_EARLYCON

config SERIAL_RX_CONSOLE_ONLY
	bool "MSM serial rx only console support"
	depends on SERIAL_MSM=y
	select SERIAL_MSM_CONSOLE
	help
	 This enable RX i.e. input receive functionality only of
	 generic serial driver while silencing TX i.e. kernel logging
	 output to console functionality.
	 If you want to enable RX only console say Y else say N.

config SERIAL_MSM_GENI
	tristate "MSM on-chip GENI HW based serial port support"
	depends on ARCH_QCOM
+7 −0
Original line number Diff line number Diff line
@@ -1642,6 +1642,12 @@ static void __msm_console_write(struct uart_port *port, const char *s,
	spin_unlock(&port->lock);
}

#ifdef CONFIG_SERIAL_RX_CONSOLE_ONLY
static void msm_console_write(struct console *co, const char *s,
			      unsigned int count)
{
}
#else
static void msm_console_write(struct console *co, const char *s,
			      unsigned int count)
{
@@ -1655,6 +1661,7 @@ static void msm_console_write(struct console *co, const char *s,

	__msm_console_write(port, s, count, msm_port->is_uartdm);
}
#endif

static int __init msm_console_setup(struct console *co, char *options)
{