USB: mos7720: fix hardware flow control
authorJohan Hovold <jhovold@gmail.com>
Tue, 4 Jun 2013 16:50:31 +0000 (18:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Jun 2013 17:17:10 +0000 (10:17 -0700)
The register access to enable hardware flow control depends on the
device port number and not the port minor number.

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

index 6eac26649009d74afe077a392eb427f5dd81733d..f27c621a9297f3c896b84c9ea700d6285ef6b94f 100644 (file)
@@ -1629,7 +1629,7 @@ static void change_port_settings(struct tty_struct *tty,
                mos7720_port->shadowMCR |= (UART_MCR_XONANY);
                /* To set hardware flow control to the specified *
                 * serial port, in SP1/2_CONTROL_REG             */
-               if (port->number)
+               if (port_number)
                        write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x01);
                else
                        write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x02);