From 26f0f2926a9fc87325f61565ce37aee2ecea23bf Mon Sep 17 00:00:00 2001 From: Chandana Kishori Chiluveru Date: Mon, 3 May 2021 17:06:49 +0530 Subject: [PATCH] serial: msm_geni_serial: Check for dev_port->is_console flag for cosole If console is disabled with below kernel cmdline arguments "console=null earlycon=null androidboot.console=null" cons->name will be set to null and cons->index pointer will not updated for console. Hence uart_console(uport) check will fail, poxy vote added by common driver probe on behalf of earlycon won't be removed. This will not allow device to enter to enter sleep. Fix this by replacing uart_console(uport)check with dev_port->console check in probe so that it will remove vote during real console probe after uart_add_one_port. Change-Id: If41f588c10546abef247b55d3cd3a1f3e80cafe4 Signed-off-by: Chandana Kishori Chiluveru --- 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 3ae76c939b6d..46304a8b0f43 100644 --- a/drivers/tty/serial/msm_geni_serial.c +++ b/drivers/tty/serial/msm_geni_serial.c @@ -3314,7 +3314,7 @@ static int msm_geni_serial_probe(struct platform_device *pdev) * Remove proxy vote from QUP core which was kept from common driver * probe on behalf of earlycon */ - if (uart_console(uport)) + if (dev_port->is_console) geni_se_remove_earlycon_icc_vote(dev_port->wrapper_dev); else spin_lock_init(&dev_port->rx_lock);