Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104648
b: refs/heads/master
c: c17ee88
h: refs/heads/master
v: v3
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jul 22, 2008
1 parent f23477b commit 0992996
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4dbd5a0961ff55cb8a7bce309dd5ef9b04090570
refs/heads/master: c17ee886976b64d29ea89ee5d87751438e26025b
37 changes: 5 additions & 32 deletions trunk/drivers/usb/serial/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,39 +81,11 @@ static int usb_console_setup(struct console *co, char *options)
if (*s)
doflow = (*s++ == 'r');
}

/* Sane default */
if (baud == 0)
baud = 9600;

/* build a cflag setting */
switch (baud) {
case 1200:
cflag |= B1200;
break;
case 2400:
cflag |= B2400;
break;
case 4800:
cflag |= B4800;
break;
case 19200:
cflag |= B19200;
break;
case 38400:
cflag |= B38400;
break;
case 57600:
cflag |= B57600;
break;
case 115200:
cflag |= B115200;
break;
case 9600:
default:
cflag |= B9600;
/*
* Set this to a sane value to prevent a divide error
*/
baud = 9600;
break;
}
switch (bits) {
case 7:
cflag |= CS7;
Expand Down Expand Up @@ -188,6 +160,7 @@ static int usb_console_setup(struct console *co, char *options)

if (serial->type->set_termios) {
termios->c_cflag = cflag;
tty_termios_encode_baud_rate(termios, baud, baud);
serial->type->set_termios(NULL, port, &dummy);

port->port.tty = NULL;
Expand Down

0 comments on commit 0992996

Please sign in to comment.