serial: pxa: Do not tweak clock in pxa serial write() function
authorHaojun Bao <hjbao@marvell.com>
Thu, 17 Jan 2013 08:01:51 +0000 (00:01 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 01:31:24 +0000 (17:31 -0800)
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>
drivers/tty/serial/pxa.c

index 3b671bc3f96626a43924d25feb96eacde6819d1a..a67f9e156ada82141ed2c70e9b09806a3516d3e7 100644 (file)
@@ -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