USB: ch341: only wake up MSR queue on changes
authorJohan Hovold <jhovold@gmail.com>
Thu, 2 Jan 2014 21:49:31 +0000 (22:49 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Jan 2014 20:42:24 +0000 (12:42 -0800)
Only wake up MSR wait queue on actual modem-status changes.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ch341.c

index 025b7857a36c33b56e7def9bfd0a0a62aff06915..acc88650ac0ac7350d2a8758c9fa0aaf9374fcf8 100644 (file)
@@ -460,6 +460,9 @@ static void ch341_update_line_status(struct usb_serial_port *port,
        if (data[1] & CH341_MULT_STAT)
                dev_dbg(&port->dev, "%s - multiple status change\n", __func__);
 
+       if (!delta)
+               return;
+
        if (delta & CH341_BIT_DCD) {
                tty = tty_port_tty_get(&port->port);
                if (tty) {