diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2014-10-16 16:54:26 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-05 18:53:55 -0800 |
commit | 64dbee31050d5b93b5fcda25508e4d3c69f6589c (patch) | |
tree | b3ab35f59ea9b4da82aea851111bdd002753651c /drivers | |
parent | 2b702b9b680cd17dbdd93461dd3f66297e313809 (diff) |
serial: core: Remove extra locking in uart_write()
uart_start() only claims the port->lock to call __uart_start(),
which does the actual processing. Eliminate the extra acquire/release
in uart_write(); call __uart_start() directly with port->lock already
held.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/serial_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index e0082b73c198..0282eaaff517 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -537,9 +537,10 @@ static int uart_write(struct tty_struct *tty, count -= c; ret += c; } + + __uart_start(tty); spin_unlock_irqrestore(&port->lock, flags); - uart_start(tty); return ret; } |