aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-07-22 06:09:29 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-22 16:03:22 -0400
commit72e2741256e65f2adcc03754523d6a2fdb260e4a (patch)
tree8d4ee7fcf003c33cd4920565a9bace26eacaaa43 /drivers/usb/serial
parent80359a9c5c03d585686e2596c9ee46703eb03047 (diff)
whiteheat: fix bugs found in the tidy and audit
Termios tidy up, plus fix break and DTR. Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/whiteheat.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 2569b68b8334..05374b99a2f8 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -671,11 +671,8 @@ static int whiteheat_open(struct tty_struct *tty,
671 goto exit; 671 goto exit;
672 } 672 }
673 673
674 if (tty) { 674 if (tty)
675 old_term.c_cflag = ~tty->termios->c_cflag; 675 firm_setup_port(tty);
676 old_term.c_iflag = ~tty->termios->c_iflag;
677 whiteheat_set_termios(tty, port, &old_term);
678 }
679 676
680 /* Work around HCD bugs */ 677 /* Work around HCD bugs */
681 usb_clear_halt(port->serial->dev, port->read_urb->pipe); 678 usb_clear_halt(port->serial->dev, port->read_urb->pipe);
@@ -926,7 +923,6 @@ static int whiteheat_ioctl(struct tty_struct *tty, struct file *file,
926static void whiteheat_set_termios(struct tty_struct *tty, 923static void whiteheat_set_termios(struct tty_struct *tty,
927 struct usb_serial_port *port, struct ktermios *old_termios) 924 struct usb_serial_port *port, struct ktermios *old_termios)
928{ 925{
929 /* FIXME */
930 firm_setup_port(tty); 926 firm_setup_port(tty);
931} 927}
932 928
@@ -1322,7 +1318,7 @@ static int firm_set_dtr(struct usb_serial_port *port, __u8 onoff)
1322 1318
1323 dtr_command.port = port->number - port->serial->minor + 1; 1319 dtr_command.port = port->number - port->serial->minor + 1;
1324 dtr_command.state = onoff; 1320 dtr_command.state = onoff;
1325 return firm_send_command(port, WHITEHEAT_SET_RTS, 1321 return firm_send_command(port, WHITEHEAT_SET_DTR,
1326 (__u8 *)&dtr_command, sizeof(dtr_command)); 1322 (__u8 *)&dtr_command, sizeof(dtr_command));
1327} 1323}
1328 1324
@@ -1333,7 +1329,7 @@ static int firm_set_break(struct usb_serial_port *port, __u8 onoff)
1333 1329
1334 break_command.port = port->number - port->serial->minor + 1; 1330 break_command.port = port->number - port->serial->minor + 1;
1335 break_command.state = onoff; 1331 break_command.state = onoff;
1336 return firm_send_command(port, WHITEHEAT_SET_RTS, 1332 return firm_send_command(port, WHITEHEAT_SET_BREAK,
1337 (__u8 *)&break_command, sizeof(break_command)); 1333 (__u8 *)&break_command, sizeof(break_command));
1338} 1334}
1339 1335