aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/omap-serial.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2014-04-23 10:58:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-04-24 19:16:33 -0400
commit6bf789672ee8387fda08af1deeffd12126e60659 (patch)
treec17f3319344c99f9de760df1589c4a8fc9fdde53 /drivers/tty/serial/omap-serial.c
parentda64c27d3c93ee9f89956b9de86c4127eb244494 (diff)
Revert "serial: omap: unlock the port lock"
This reverts commit 0324a821029e1f54e7a7f8fed48693cfce42dc0e. That commit tried to fix a deadlock problem when using hci_ldisc, but it turns out the bug was in hci_ldsic all along where it was calling ->write() from within ->write_wakeup() callback. The problem is that ->write_wakeup() was called with port lock held and ->write() tried to grab the same port lock. Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/omap-serial.c')
-rw-r--r--drivers/tty/serial/omap-serial.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index 08b6b9419f0d..837f6c1c8e7a 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -398,11 +398,8 @@ static void transmit_chars(struct uart_omap_port *up, unsigned int lsr)
398 break; 398 break;
399 } while (--count > 0); 399 } while (--count > 0);
400 400
401 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) { 401 if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
402 spin_unlock(&up->port.lock);
403 uart_write_wakeup(&up->port); 402 uart_write_wakeup(&up->port);
404 spin_lock(&up->port.lock);
405 }
406 403
407 if (uart_circ_empty(xmit)) 404 if (uart_circ_empty(xmit))
408 serial_omap_stop_tx(&up->port); 405 serial_omap_stop_tx(&up->port);