summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-28 13:32:57 +0200
committerClark Williams <williams@redhat.com>2012-02-15 10:32:56 -0600
commit00be85162c26a33c2b9fbd52b7d37b844e073d5b (patch)
tree92e89a86f01cc7a33777c2b92bb9b86179c05ef4
parent1abedf83a679b0c90ece0cd5b5706e2484d0c842 (diff)
drivers-tty-fix-omap-lock-crap.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--drivers/tty/serial/omap-serial.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 5e713d3ef1f4..93cdb92d1632 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -946,13 +946,12 @@ serial_omap_console_write(struct console *co, const char *s,
unsigned int ier;
int locked = 1;
- local_irq_save(flags);
if (up->port.sysrq)
locked = 0;
else if (oops_in_progress)
- locked = spin_trylock(&up->port.lock);
+ locked = spin_trylock_irqsave(&up->port.lock, flags);
else
- spin_lock(&up->port.lock);
+ spin_lock_irqsave(&up->port.lock, flags);
/*
* First save the IER then disable the interrupts
@@ -979,8 +978,7 @@ serial_omap_console_write(struct console *co, const char *s,
check_modem_status(up);
if (locked)
- spin_unlock(&up->port.lock);
- local_irq_restore(flags);
+ spin_unlock_irqrestore(&up->port.lock, flags);
}
static int __init