From ed35e09248c12d246b49b6b3ce9fdcec8a5badb6 Mon Sep 17 00:00:00 2001 From: Haojun Bao Date: Thu, 17 Jan 2013 00:01:51 -0800 Subject: [PATCH] serial: pxa: Do not tweak clock in pxa serial write() function 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 Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/pxa.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c index 3b671bc3f966..a67f9e156ada 100644 --- a/drivers/tty/serial/pxa.c +++ b/drivers/tty/serial/pxa.c @@ -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) @@ -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 -- 2.39.5