diff options
author | Aristeu Rozanski <aris@ruivo.org> | 2007-11-12 15:14:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-02-01 17:34:50 -0500 |
commit | 27680d232b04d434d8d49a8417429b9512ffb7c6 (patch) | |
tree | 083cf04c12463faf11ce72df2c9a2c57daa3620b /drivers | |
parent | d09d6a351498fcd6195f05c3964320ae6fbeadb1 (diff) |
USB: usb_serial_console: fix command line parsing
Currently usb serial console support ignores the device and always use
ttyUSB0.
Signed-off-by: Aristeu Rozanski <arozansk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/console.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/serial/console.c b/drivers/usb/serial/console.c index 0362654d3b52..72ab3bbf0f2e 100644 --- a/drivers/usb/serial/console.c +++ b/drivers/usb/serial/console.c | |||
@@ -133,11 +133,14 @@ static int usb_console_setup(struct console *co, char *options) | |||
133 | } | 133 | } |
134 | co->cflag = cflag; | 134 | co->cflag = cflag; |
135 | 135 | ||
136 | /* grab the first serial port that happens to be connected */ | 136 | /* |
137 | serial = usb_serial_get_by_index(0); | 137 | * no need to check the index here: if the index is wrong, console |
138 | * code won't call us | ||
139 | */ | ||
140 | serial = usb_serial_get_by_index(co->index); | ||
138 | if (serial == NULL) { | 141 | if (serial == NULL) { |
139 | /* no device is connected yet, sorry :( */ | 142 | /* no device is connected yet, sorry :( */ |
140 | err ("No USB device connected to ttyUSB0"); | 143 | err ("No USB device connected to ttyUSB%i", co->index); |
141 | return -ENODEV; | 144 | return -ENODEV; |
142 | } | 145 | } |
143 | 146 | ||