aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/serial_core.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2014-10-16 16:54:26 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-05 18:53:55 -0800
commit64dbee31050d5b93b5fcda25508e4d3c69f6589c (patch)
treeb3ab35f59ea9b4da82aea851111bdd002753651c /drivers/tty/serial/serial_core.c
parentserial: core: Colocate crucial structure linkage (diff)
downloadlinux-dev-64dbee31050d5b93b5fcda25508e4d3c69f6589c.tar.xz
linux-dev-64dbee31050d5b93b5fcda25508e4d3c69f6589c.zip
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/tty/serial/serial_core.c')
-rw-r--r--drivers/tty/serial/serial_core.c3
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;
}