提交 6c3a30c7 编写于 作者: F Felipe Balbi 提交者: Greg Kroah-Hartman

serial: omap: don't save IRQ flags on hardirq

When we're running our hardirq handler, there's
not need to disable IRQs with spin_lock_irqsave()
because IRQs are already disabled. It also makes
no difference if we save or not IRQ flags.

Switch over to simple spin_lock/spin_unlock and
drop the "flags" variable.
Tested-by: NShubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 7e9c8e7d
......@@ -351,11 +351,10 @@ static inline irqreturn_t serial_omap_irq(int irq, void *dev_id)
struct tty_struct *tty = up->port.state->port.tty;
unsigned int iir, lsr;
unsigned int type;
unsigned long flags;
irqreturn_t ret = IRQ_NONE;
int max_count = 256;
spin_lock_irqsave(&up->port.lock, flags);
spin_lock(&up->port.lock);
pm_runtime_get_sync(up->dev);
do {
......@@ -394,7 +393,7 @@ static inline irqreturn_t serial_omap_irq(int irq, void *dev_id)
}
} while (!(iir & UART_IIR_NO_INT) && max_count--);
spin_unlock_irqrestore(&up->port.lock, flags);
spin_unlock(&up->port.lock);
tty_flip_buffer_push(tty);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册