Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 64dbee31 authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman
Browse files

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: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2b702b9b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
}