Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 82204
b: refs/heads/master
c: 27680d2
h: refs/heads/master
v: v3
  • Loading branch information
Aristeu Rozanski authored and Greg Kroah-Hartman committed Feb 1, 2008
1 parent dbd6eca commit 1ac007a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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: d09d6a351498fcd6195f05c3964320ae6fbeadb1
refs/heads/master: 27680d232b04d434d8d49a8417429b9512ffb7c6
9 changes: 6 additions & 3 deletions trunk/drivers/usb/serial/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,11 +133,14 @@ static int usb_console_setup(struct console *co, char *options)
}
co->cflag = cflag;

/* grab the first serial port that happens to be connected */
serial = usb_serial_get_by_index(0);
/*
* no need to check the index here: if the index is wrong, console
* code won't call us
*/
serial = usb_serial_get_by_index(co->index);
if (serial == NULL) {
/* no device is connected yet, sorry :( */
err ("No USB device connected to ttyUSB0");
err ("No USB device connected to ttyUSB%i", co->index);
return -ENODEV;
}

Expand Down

0 comments on commit 1ac007a

Please sign in to comment.