diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-28 13:32:57 +0200 |
---|---|---|
committer | Anders Roxell <anders.roxell@linaro.org> | 2015-05-08 22:32:22 +0200 |
commit | cb7b35509431aac5b7486e3686762f2a4b51f63e (patch) | |
tree | 9fde7052d9d0b6802a69ceac00b9eaad0a00800e /drivers/tty | |
parent | 0d7e14b4867bb0305d83a6c1133986d01667cba6 (diff) |
drivers-tty-fix-omap-lock-crap.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 18c30cabe27f..6f0629ead171 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1270,13 +1270,10 @@ serial_omap_console_write(struct console *co, const char *s, pm_runtime_get_sync(up->dev); - local_irq_save(flags); - if (up->port.sysrq) - locked = 0; - else if (oops_in_progress) - locked = spin_trylock(&up->port.lock); + if (up->port.sysrq || oops_in_progress) + 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 @@ -1305,8 +1302,7 @@ serial_omap_console_write(struct console *co, const char *s, pm_runtime_mark_last_busy(up->dev); pm_runtime_put_autosuspend(up->dev); if (locked) - spin_unlock(&up->port.lock); - local_irq_restore(flags); + spin_unlock_irqrestore(&up->port.lock, flags); } static int __init |