[PATCH 25/70] whiteheat: fix bugs found in the tidy and audit

From: Alan Cox
Date: Fri Jun 20 2008 - 16:24:34 EST


From: Alan Cox <alan@xxxxxxxxxx>

Termios tidy up, plus fix break and DTR.

Signed-off-by: Alan Cox <alan@xxxxxxxxxx>
---

drivers/usb/serial/whiteheat.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)


diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 5a3ed57..0954191 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -652,11 +652,8 @@ static int whiteheat_open(struct tty_struct *tty,
goto exit;
}

- if (tty) {
- old_term.c_cflag = ~tty->termios->c_cflag;
- old_term.c_iflag = ~tty->termios->c_iflag;
- whiteheat_set_termios(tty, port, &old_term);
- }
+ if (tty)
+ firm_setup_port(tty);

/* Work around HCD bugs */
usb_clear_halt(port->serial->dev, port->read_urb->pipe);
@@ -907,7 +904,6 @@ static int whiteheat_ioctl(struct tty_struct *tty, struct file *file,
static void whiteheat_set_termios(struct tty_struct *tty,
struct usb_serial_port *port, struct ktermios *old_termios)
{
- /* FIXME */
firm_setup_port(tty);
}

@@ -1303,7 +1299,7 @@ static int firm_set_dtr(struct usb_serial_port *port, __u8 onoff)

dtr_command.port = port->number - port->serial->minor + 1;
dtr_command.state = onoff;
- return firm_send_command(port, WHITEHEAT_SET_RTS,
+ return firm_send_command(port, WHITEHEAT_SET_DTR,
(__u8 *)&dtr_command, sizeof(dtr_command));
}

@@ -1314,7 +1310,7 @@ static int firm_set_break(struct usb_serial_port *port, __u8 onoff)

break_command.port = port->number - port->serial->minor + 1;
break_command.state = onoff;
- return firm_send_command(port, WHITEHEAT_SET_RTS,
+ return firm_send_command(port, WHITEHEAT_SET_BREAK,
(__u8 *)&break_command, sizeof(break_command));
}


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/