Patch #4/4.

(Now let's see how much I've messed up...)

Thanks
Guennadi
---
Guennadi Liakhovetski

Prevent ENODEV on a /dev/ttyUSBx, used as a USB-serial console.

Original author: Paul Fulghum <[EMAIL PROTECTED]>
Signed-off-by: Guennadi Liakhovetski <[EMAIL PROTECTED]>

diff -u a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
--- a/drivers/usb/serial/usb-serial.c   30 Mar 2006 19:18:07 -0000
+++ b/drivers/usb/serial/usb-serial.c   11 Apr 2006 18:02:12 -0000
@@ -197,12 +197,12 @@
         
        ++port->open_count;
 
-       if (port->open_count == 1) {
+       /* set up our port structure making the tty driver
+        * remember our port object, and us it */
+       tty->driver_data = port;
+       port->tty = tty;
 
-               /* set up our port structure making the tty driver
-                * remember our port object, and us it */
-               tty->driver_data = port;
-               port->tty = tty;
+       if (port->open_count == 1) {
 
                /* lock this module before we call it
                 * this may fail, which means we must bail out,


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to