Commit 4208978e authored by Savin Zlobec's avatar Savin Zlobec Committed by Greg Kroah-Hartman
Browse files

USB: gadget: Hangup tty on g_serial disconnect

On USB cable disconnect g_serial doesn't hangup the port tty,
which results in an endless read on the tty device. With the
following patch the read and select behave correctly when
the cable is unplugged.

Tested on at91rm9200
Signed-off-by: default avatarSavin Zlobec <>
Signed-off-by: default avatarDavid Brownell <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent c765d4ca
......@@ -2163,8 +2163,7 @@ static void gs_free_ports(struct gs_dev *dev)
port->port_dev = NULL;
if (port->port_tty) {
spin_unlock_irqrestore(&port->port_lock, flags);
} else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment