tty: msm_geni: 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: I1019796185c3443bd6156030020eb5274bdfa178
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
This commit is contained in:
Raghavendra Rao Ananta
2020-03-27 16:56:04 -07:00
parent e51f74d2f1
commit a0a6c2e4bf

View File

@ -2213,7 +2213,7 @@ static ssize_t ver_info_show(struct device *dev,
static DEVICE_ATTR_RO(ver_info);
#if defined(CONFIG_SERIAL_MSM_GENI_CONSOLE) || defined(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;