From d6433f75e5637b927d3d443f09174a9034412a51 Mon Sep 17 00:00:00 2001 From: Akash Asthana Date: Fri, 3 Jul 2020 18:44:43 +0530 Subject: [PATCH] serial: msm_geni_serial: Do not place msm_geni_console_setup under __init msm_geni_console_setup() can be potentially called from the driver's probe via uart_add_one_port(). Since it's placed under __init, the function would be discarded as soon as the module_init portion of the driver completes, and when called during probe, it causes an instruction abort. As a result, move the msm_geni_console_setup() out of __init. Change-Id: I27ebdcd0832bb49d66e85b250b652cc38f4aa333 Signed-off-by: Akash Asthana --- drivers/tty/serial/msm_geni_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/msm_geni_serial.c b/drivers/tty/serial/msm_geni_serial.c index b227646dac3a..6985574b1350 100644 --- a/drivers/tty/serial/msm_geni_serial.c +++ b/drivers/tty/serial/msm_geni_serial.c @@ -2557,7 +2557,7 @@ static DEVICE_ATTR_RO(ver_info); #if IS_ENABLED(CONFIG_SERIAL_MSM_GENI_CONSOLE) || \ IS_ENABLED(CONFIG_CONSOLE_POLL) -static int __init msm_geni_console_setup(struct console *co, char *options) +static int msm_geni_console_setup(struct console *co, char *options) { struct uart_port *uport; struct msm_geni_serial_port *dev_port;