提交 ca85485c 编写于 作者: P Paul Fulghum 提交者: Greg Kroah-Hartman

[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: NGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 57845bd1
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册