Skip to content

Commit

Permalink
serial: pxa: Do not tweak clock in pxa serial write() function
Browse files Browse the repository at this point in the history
The write() function could be used by printk(), which is atomic and
tweaking clock there can cause "BUG: sleeping function called from
invalid context".

Signed-off-by: Bao Haojun <hjbao@marvell.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Haojun Bao authored and Greg Kroah-Hartman committed Jan 18, 2013
1 parent b786337 commit ed35e09
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/tty/serial/pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
unsigned long flags;
int locked = 1;

clk_prepare_enable(up->clk);

local_irq_save(flags);
if (up->port.sysrq)
Expand Down Expand Up @@ -701,7 +700,6 @@ serial_pxa_console_write(struct console *co, const char *s, unsigned int count)
spin_unlock(&up->port.lock);
local_irq_restore(flags);

clk_disable_unprepare(up->clk);
}

#ifdef CONFIG_CONSOLE_POLL
Expand Down

0 comments on commit ed35e09

Please sign in to comment.