diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-07-28 13:32:57 +0200 |
---|---|---|
committer | Clark Williams <williams@redhat.com> | 2011-12-28 16:25:46 -0600 |
commit | 2299fd3697253b2c64578e8b5aec7c7d82132570 (patch) | |
tree | 38ba3afd4227675b3f03a9cbe2cb5294d2cc2a6a /drivers | |
parent | b6b76024797d4f893c3174467eca25a6a467efb3 (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 | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 5e713d3ef1f4..93cdb92d1632 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c @@ -946,13 +946,12 @@ serial_omap_console_write(struct console *co, const char *s, 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 *co, const char *s, 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 |