diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-28 13:32:57 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2012-04-13 11:01:43 -0500 |
commit | b31f133f7602fe77dbf48c72becb3cc43be9bbfe (patch) | |
tree | d5ce4b9e0bfbf54093e635130c6b17efa176810f /drivers | |
parent | cf771af44e6bb2d48572d813473654c6e86bd8b0 (diff) |
drivers-tty-fix-omap-lock-crap.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers')
-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 0121486ac4fa..d4b09fbeabeb 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -1064,13 +1064,10 @@ serial_omap_console_write(struct console *co, const char *s, pm_runtime_get_sync(&up->pdev->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 @@ -1099,8 +1096,7 @@ serial_omap_console_write(struct console *co, const char *s, pm_runtime_mark_last_busy(&up->pdev->dev); pm_runtime_put_autosuspend(&up->pdev->dev); if (locked) - spin_unlock(&up->port.lock); - local_irq_restore(flags); + spin_unlock_irqrestore(&up->port.lock, flags); } static int __init |