diff options
author | Paul Fulghum <paulkf@microgate.com> | 2006-04-13 16:28:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-21 18:04:09 -0400 |
commit | ca85485c1f482e6625f36aceb85eaaeff4b22d79 (patch) | |
tree | 8baa96756703e12b9033b8618bd0cdbfc2a1143b /drivers | |
parent | 57845bd104233cb75b9ab3624f7ea7662298bc27 (diff) |
[PATCH] USB: console: prevent ENODEV on node
Prevent ENODEV on a /dev/ttyUSBx, used as a USB-serial console.
From: Paul Fulghum <paulkf@microgate.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 9c36f0ece20f..de9111d97a58 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -201,12 +201,12 @@ static int serial_open (struct tty_struct *tty, struct file * filp) | |||
201 | 201 | ||
202 | ++port->open_count; | 202 | ++port->open_count; |
203 | 203 | ||
204 | if (port->open_count == 1) { | 204 | /* set up our port structure making the tty driver |
205 | * remember our port object, and us it */ | ||
206 | tty->driver_data = port; | ||
207 | port->tty = tty; | ||
205 | 208 | ||
206 | /* set up our port structure making the tty driver | 209 | if (port->open_count == 1) { |
207 | * remember our port object, and us it */ | ||
208 | tty->driver_data = port; | ||
209 | port->tty = tty; | ||
210 | 210 | ||
211 | /* lock this module before we call it | 211 | /* lock this module before we call it |
212 | * this may fail, which means we must bail out, | 212 | * this may fail, which means we must bail out, |