lkml.org 
[lkml]   [2012]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 13/13] serial: omap: don't save IRQ flags on hardirq
Date
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.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
drivers/tty/serial/omap-serial.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index b79c4fa..a79658d 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -350,11 +350,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_HANDLED;
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);

--
1.7.12.rc3


\
 
 \ /
  Last update: 2012-08-21 15:01    [W:0.149 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site