drivers-tty-fix-omap-lock-crap.patch

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Thomas Gleixner 2011-07-28 13:32:57 +02:00 committed by Alibek Omarov
parent 1c81d2eb01
commit c564c05244
1 changed files with 4 additions and 8 deletions

View File

@ -1279,13 +1279,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
@ -1314,8 +1311,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