]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
USB: whiteheat: fix broken port configuration
authorJohan Hovold <jhovold@gmail.com>
Thu, 6 Jun 2013 11:32:47 +0000 (13:32 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jun 2013 17:49:08 +0000 (10:49 -0700)
commit 9eecf22d2b375b9064a20421c6c307b760b03d46 upstream.

When configuring the port (e.g. set_termios) the port minor number
rather than the port number was used in the request (and they only
coincide for minor number 0).

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

index b9fca3586d741003a50ffb435be7de74020c48e8..347caad47a121d3f7a26ec7f3246a6960114ffc2 100644 (file)
@@ -649,7 +649,7 @@ static void firm_setup_port(struct tty_struct *tty)
        struct whiteheat_port_settings port_settings;
        unsigned int cflag = tty->termios.c_cflag;
 
-       port_settings.port = port->number + 1;
+       port_settings.port = port->number - port->serial->minor + 1;
 
        /* get the byte size */
        switch (cflag & CSIZE) {