From 480740552327f56f90c3bfd479a2b0dc79a35a63 Mon Sep 17 00:00:00 2001 From: Mukesh Kumar Savaliya Date: Thu, 20 Jul 2017 13:42:05 +0530 Subject: [PATCH] serial: msm_serial_hs: Modify wakeup handler disablement and processing Make sure to disable wakeup irq synchronously as in an aggressive scheduling system if it's asynchronous then unserved interrupt can get scheduled later. In addition remove the threaded handler and configure as an ISR to not have scheduler impact on functionalities. Change-Id: Id525d5295834b73c2f42d52f0e363f0bdec1d22a Signed-off-by: Mukesh Kumar Savaliya --- drivers/tty/serial/msm_serial_hs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/msm_serial_hs.c b/drivers/tty/serial/msm_serial_hs.c index 830ef92ffe80..0cad7f713050 100644 --- a/drivers/tty/serial/msm_serial_hs.c +++ b/drivers/tty/serial/msm_serial_hs.c @@ -2255,7 +2255,7 @@ void disable_wakeup_interrupt(struct msm_hs_port *msm_uport) return; if (msm_uport->wakeup.enabled) { - disable_irq_nosync(msm_uport->wakeup.irq); + disable_irq(msm_uport->wakeup.irq); enable_irq(uport->irq); spin_lock_irqsave(&uport->lock, flags); msm_uport->wakeup.enabled = false; @@ -2614,8 +2614,7 @@ static int msm_hs_startup(struct uart_port *uport) msm_hs_resource_vote(msm_uport); if (is_use_low_power_wakeup(msm_uport)) { - ret = request_threaded_irq(msm_uport->wakeup.irq, NULL, - msm_hs_wakeup_isr, + ret = request_irq(msm_uport->wakeup.irq, msm_hs_wakeup_isr, IRQF_TRIGGER_FALLING | IRQF_ONESHOT, "msm_hs_wakeup", msm_uport); if (unlikely(ret)) {