Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325595
b: refs/heads/master
c: cfe275c
h: refs/heads/master
i:
  325593: 11add41
  325591: cf939c2
v: v3
  • Loading branch information
Chao Xie authored and Greg Kroah-Hartman committed Jun 15, 2012
1 parent 5592ec6 commit b2de3c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2fc46915ecfbc51afcf995901f6ade7c3d503a25
refs/heads/master: cfe275c2db6932e81ea23288a8a74f0b815c9513
14 changes: 14 additions & 0 deletions trunk/drivers/tty/serial/pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,9 +670,19 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
{
struct uart_pxa_port *up = serial_pxa_ports[co->index];
unsigned int ier;
unsigned long flags;
int locked = 1;

clk_prepare_enable(up->clk);

local_irq_save(flags);
if (up->port.sysrq)
locked = 0;
else if (oops_in_progress)
locked = spin_trylock(&up->port.lock);
else
spin_lock(&up->port.lock);

/*
* First save the IER then disable the interrupts
*/
Expand All @@ -688,6 +698,10 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
wait_for_xmitr(up);
serial_out(up, UART_IER, ier);

if (locked)
spin_unlock(&up->port.lock);
local_irq_restore(flags);

clk_disable_unprepare(up->clk);
}

Expand Down

0 comments on commit b2de3c2

Please sign in to comment.