From 9ad837c12cb122be069bbbb4305611bf7ec18225 Mon Sep 17 00:00:00 2001 From: a17671 Date: Tue, 30 Nov 2021 17:08:37 +0800 Subject: [PATCH] Revert "tty:revert the tty update from qcom for moto tty_diag driver" Keep the upstream pty driver Adjust the moto tty_diag to solve the watchdog panic This reverts commit 257cf44a1f9264ced64fde12868ed543a7d270af. Change-Id: Id362323694562ba26f5531099ce32da649872476 Signed-off-by: a17671 Reviewed-on: https://gerrit.mot.com/2130818 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/tty/pty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 00099a8439d2..c6a1d8c4e689 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -120,10 +120,10 @@ static int pty_write(struct tty_struct *tty, const unsigned char *buf, int c) spin_lock_irqsave(&to->port->lock, flags); /* Stuff the data into the input queue of the other end */ c = tty_insert_flip_string(to->port, buf, c); + spin_unlock_irqrestore(&to->port->lock, flags); /* And shovel */ if (c) tty_flip_buffer_push(to->port); - spin_unlock_irqrestore(&to->port->lock, flags); } return c; }