diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-28 13:32:57 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-10 16:37:23 -0500 |
commit | c08b0f09b28779ca19537436dd0ca77ff06a9998 (patch) | |
tree | 2a2cf1023d9f8a1076abfdc831b0bebdade457b5 | |
parent | 2995ed347d201139525b180220fcb96bf73e9373 (diff) |
drivers-tty-fix-omap-lock-crap.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 8 |
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 |