[23/93] USB: mos7720: fix hardware flow control

Message ID 1371555821-12820-24-git-send-email-luis.henriques@canonical.com
State New
Headers show

Commit Message

Luis Henriques June 18, 2013, 11:42 a.m. -stable review patch.  If anyone has any objections, please let me know.


From: Johan Hovold <jhovold@gmail.com>

commit a26f009a070e840fadacb91013b2391ba7ab6cc2 upstream.

The register access to enable hardware flow control depends on the
device port number and not the port minor number.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
 drivers/usb/serial/mos7720.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c
index bd42c97..614ad93 100644
--- a/drivers/usb/serial/mos7720.c
+++ b/drivers/usb/serial/mos7720.c
@@ -1695,7 +1695,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);
 			write_mos_reg(serial, dummy, SP_CONTROL_REG, 0x02);