linux/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-c...

40 lines
1.1 KiB
Diff
Raw Normal View History

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 | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
Index: linux-3.2/drivers/tty/serial/omap-serial.c
===================================================================
--- linux-3.2.orig/drivers/tty/serial/omap-serial.c
+++ linux-3.2/drivers/tty/serial/omap-serial.c
@@ -946,13 +946,12 @@ serial_omap_console_write(struct console
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
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