diff options
author | Mihai Serban <mihai.serban@intel.com> | 2015-12-04 16:52:27 +0200 |
---|---|---|
committer | Bruce Beare <bruce.j.beare@intel.com> | 2015-12-08 10:33:40 -0800 |
commit | 52cd55470a9b10dbcdab6775ef075727cd1b2b14 (patch) | |
tree | 31af4a378bad26c62cc67ae6ec2574237e4d16bb | |
parent | a1be97b3ee277d5538ab8a8c7421102d0f7a8247 (diff) | |
download | edison-v3.10-52cd55470a9b10dbcdab6775ef075727cd1b2b14.tar.gz |
hsu: remove schedule() from atomic context
The serial_hsu_command() function can be called from atomic or non-atomic
context. When it is executed from atomic context it must not call schedule().
BUG=26083445
Change-Id: I6194d817df553b84c5f082b5f2937eae25f27757
Tracked-On: https://jira01.devtools.intel.com/browse/BP-156
Signed-off-by: Mihai Serban <mihai.serban@intel.com>
Reviewed-on: https://android.intel.com/444580
Reviewed-by: Gross, Mark <mark.gross@intel.com>
Reviewed-by: Beare, Bruce J <bruce.j.beare@intel.com>
-rw-r--r-- | drivers/tty/serial/mfd_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/tty/serial/mfd_core.c b/drivers/tty/serial/mfd_core.c index bbb318d3158..39f25226abd 100644 --- a/drivers/tty/serial/mfd_core.c +++ b/drivers/tty/serial/mfd_core.c @@ -2125,7 +2125,10 @@ static void serial_hsu_command(struct uart_hsu_port *up) serial_out(up, UART_IER, 0); while (cl_get_char(up, &c)) { while (!wait_for_xmitr(up)) - schedule(); + if (up->in_tasklet) + cpu_relax(); + else + schedule(); serial_out(up, UART_TX, c); } serial_out(up, UART_IER, up->ier); |