aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2012-09-06 08:45:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-06 12:17:01 -0400
commit6c3a30c7fbed820f65d5e708f1e83468d8ec9921 (patch)
tree64bab92d01b82786fbae81561bea7528ec407a2d /drivers/tty/serial
parent7e9c8e7dbf3b9cc94947d76cb57985682517cc6e (diff)
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: Shubhrajyoti D <shubhrajyoti@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/omap-serial.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 0ceca4457d3b..99042b0fb941 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -351,11 +351,10 @@ static inline irqreturn_t serial_omap_irq(int irq, void *dev_id)
351 struct tty_struct *tty = up->port.state->port.tty; 351 struct tty_struct *tty = up->port.state->port.tty;
352 unsigned int iir, lsr; 352 unsigned int iir, lsr;
353 unsigned int type; 353 unsigned int type;
354 unsigned long flags;
355 irqreturn_t ret = IRQ_NONE; 354 irqreturn_t ret = IRQ_NONE;
356 int max_count = 256; 355 int max_count = 256;
357 356
358 spin_lock_irqsave(&up->port.lock, flags); 357 spin_lock(&up->port.lock);
359 pm_runtime_get_sync(up->dev); 358 pm_runtime_get_sync(up->dev);
360 359
361 do { 360 do {
@@ -394,7 +393,7 @@ static inline irqreturn_t serial_omap_irq(int irq, void *dev_id)
394 } 393 }
395 } while (!(iir & UART_IIR_NO_INT) && max_count--); 394 } while (!(iir & UART_IIR_NO_INT) && max_count--);
396 395
397 spin_unlock_irqrestore(&up->port.lock, flags); 396 spin_unlock(&up->port.lock);
398 397
399 tty_flip_buffer_push(tty); 398 tty_flip_buffer_push(tty);
400 399