From: Haojun Bao <hjbao@marvell.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Cc: Alan Cox <alan@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>,
Russell King - ARM Linux <linux@arm.linux.org.uk>
Subject: [PATCH] Do not tweak clock in pxa serial write() function
Date: Thu, 17 Jan 2013 00:01:51 -0800 [thread overview]
Message-ID: <87k3rc44sq.fsf@bj-lt7.marvell.com> (raw)
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
reply other threads:[~2013-01-17 8:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k3rc44sq.fsf@bj-lt7.marvell.com \
--to=hjbao@marvell.com \
--cc=alan@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®