* [PATCH] USB: whiteheat: fix broken port configuration
[not found] <20130606113106.GI2566@localhost>
@ 2013-06-06 11:32 ` Johan Hovold
0 siblings, 0 replies; only message in thread
From: Johan Hovold @ 2013-06-06 11:32 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, Tobias Winter, Bjørn Mork,
Rob Landley, Johan Hovold, stable
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).
Cc: stable@vger.kernel.org
Signed-off-by: Johan Hovold <jhovold@gmail.com>
---
drivers/usb/serial/whiteheat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index b9fca35..347caad 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -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) {
--
1.8.2.1
^ permalink raw reply related [flat|nested] only message in thread