diff options
author | Douglas Anderson <dianders@chromium.org> | 2018-10-30 15:11:05 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-11-09 09:07:17 -0800 |
commit | 336447b3298c5d5cda31270af716ad67ac4c7267 (patch) | |
tree | 34fe1411b2862ff8ad275f34142901acc24de6c0 /drivers/tty | |
parent | d6e1935819db0c91ce4a5af82466f3ab50d17346 (diff) |
serial: qcom_geni_serial: Process sysrq at port unlock time
Let's take advantage of the new ("serial: core: Allow processing sysrq
at port unlock time") to handle sysrqs more cleanly.
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/qcom_geni_serial.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c index 864c0e8aa84b..ac001c07399b 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -497,9 +497,7 @@ static int handle_rx_console(struct uart_port *uport, u32 bytes, bool drop) continue; } - spin_unlock(&uport->lock); - sysrq = uart_handle_sysrq_char(uport, buf[c]); - spin_lock(&uport->lock); + sysrq = uart_prepare_sysrq_char(uport, buf[c]); if (!sysrq) tty_insert_flip_char(tport, buf[c], TTY_NORMAL); @@ -809,7 +807,8 @@ static irqreturn_t qcom_geni_serial_isr(int isr, void *dev) qcom_geni_serial_handle_rx(uport, drop_rx); out_unlock: - spin_unlock_irqrestore(&uport->lock, flags); + uart_unlock_and_check_sysrq(uport, flags); + return IRQ_HANDLED; } |