Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=27680d232b04d434d8d49a8417429b9512ffb7c6
Commit:     27680d232b04d434d8d49a8417429b9512ffb7c6
Parent:     d09d6a351498fcd6195f05c3964320ae6fbeadb1
Author:     Aristeu Rozanski <[EMAIL PROTECTED]>
AuthorDate: Mon Nov 12 15:14:49 2007 -0500
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 14:34:50 2008 -0800

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 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 0362654..72ab3bb 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)
        }
        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;
        }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to