All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Do not tweak clock in pxa serial write() function
@ 2013-01-17  8:01 Haojun Bao
  0 siblings, 0 replies; only message in thread
From: Haojun Bao @ 2013-01-17  8:01 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org
  Cc: Alan Cox, Greg Kroah-Hartman, Jiri Slaby,
	Russell King - ARM Linux


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>
---
 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 2764828..fa1d5ae 100644
--- a/drivers/tty/serial/pxa.c
+++ b/drivers/tty/serial/pxa.c
@@ -673,7 +673,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)
@@ -702,7 +701,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
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-17  8:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17  8:01 [PATCH] Do not tweak clock in pxa serial write() function Haojun Bao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.