Skip to content

Commit

Permalink
serial: omap: don't save IRQ flags on hardirq
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Felipe Balbi authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent 7e9c8e7 commit 6c3a30c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/tty/serial/omap-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 6c3a30c

Please sign in to comment.