提交 1c517669 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

USB: oti6858: fix abuse of interface data

Fix abuse of interface data which was used to signal device disconnect.

Note that neither tiocmset or tiocmget need to check for disconnect as
they do not access the device.
Signed-off-by: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 81d5a672
......@@ -633,9 +633,6 @@ static int oti6858_tiocmset(struct tty_struct *tty,
dbg("%s(port = %d, set = 0x%08x, clear = 0x%08x)",
__func__, port->number, set, clear);
if (!usb_get_intfdata(port->serial->interface))
return -ENODEV;
/* FIXME: check if this is correct (active high/low) */
spin_lock_irqsave(&priv->lock, flags);
control = priv->pending_setup.control;
......@@ -665,9 +662,6 @@ static int oti6858_tiocmget(struct tty_struct *tty)
dbg("%s(port = %d)", __func__, port->number);
if (!usb_get_intfdata(port->serial->interface))
return -ENODEV;
spin_lock_irqsave(&priv->lock, flags);
pin_state = priv->status.pin_state & PIN_MASK;
spin_unlock_irqrestore(&priv->lock, flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册