[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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
57845bd104
commit
ca85485c1f
@@ -201,12 +201,12 @@ static int serial_open (struct tty_struct *tty, struct file * filp)
|
|||||||
|
|
||||||
++port->open_count;
|
++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
|
if (port->open_count == 1) {
|
||||||
* remember our port object, and us it */
|
|
||||||
tty->driver_data = port;
|
|
||||||
port->tty = tty;
|
|
||||||
|
|
||||||
/* lock this module before we call it
|
/* lock this module before we call it
|
||||||
* this may fail, which means we must bail out,
|
* this may fail, which means we must bail out,
|
||||||
|
Reference in New Issue
Block a user