Skip to contentSkip to conversation

Do not tweak clock in pxa serial write() function

PATCH New Haojun Bao 1 participant 1 message Jan 17, 2013 TTY layer and serial drivers

lore
Share & tools
lore

Haojun Bao

author
#0 lore raw

PATCH 1/1 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".

---
 drivers/tty/serial/pxa.c |    2 --
 1 file changed, 2 deletions(-)
drivers/tty/serial/pxa.c +0 -2
index 2764828..fa1d5ae 100644
@@ -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
Signature · 1 line
1.7.10.4