41 lines
1.3 KiB
Diff
41 lines
1.3 KiB
Diff
Subject: drivers-tty-fix-omap-lock-crap.patch
|
|
From: Thomas Gleixner <tglx@linutronix.de>
|
|
Date: Thu, 28 Jul 2011 13:32:57 +0200
|
|
|
|
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
|
|
---
|
|
drivers/tty/serial/omap-serial.c | 12 ++++--------
|
|
1 file changed, 4 insertions(+), 8 deletions(-)
|
|
|
|
Index: linux-stable/drivers/tty/serial/omap-serial.c
|
|
===================================================================
|
|
--- linux-stable.orig/drivers/tty/serial/omap-serial.c
|
|
+++ linux-stable/drivers/tty/serial/omap-serial.c
|
|
@@ -1082,13 +1082,10 @@ serial_omap_console_write(struct console
|
|
|
|
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
|
|
@@ -1117,8 +1114,7 @@ serial_omap_console_write(struct console
|
|
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
|