Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ed35e092 authored by Haojun Bao's avatar Haojun Bao Committed by Greg Kroah-Hartman
Browse files

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: default avatarBao Haojun <hjbao@marvell.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b786337d
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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