Skip to content

Commit

Permalink
[PATCH] USB: console: prevent ENODEV on node
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Fulghum authored and Greg Kroah-Hartman committed Jun 21, 2006
1 parent 57845bd commit ca85485
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,12 @@ static int serial_open (struct tty_struct *tty, struct file * filp)

++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,
Expand Down

0 comments on commit ca85485

Please sign in to comment.