mirror of
https://github.com/torvalds/linux.git
synced 2024-11-06 20:21:57 +00:00
USB: pl2303: remove disconnect test from tiocmset
Remove unnecessary disconnect test in tiocmset. No ioctls will be made after disconnect returns. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
aff5b323b3
commit
5ddbb26b8b
@ -531,7 +531,6 @@ static int pl2303_tiocmset(struct tty_struct *tty,
|
|||||||
unsigned int set, unsigned int clear)
|
unsigned int set, unsigned int clear)
|
||||||
{
|
{
|
||||||
struct usb_serial_port *port = tty->driver_data;
|
struct usb_serial_port *port = tty->driver_data;
|
||||||
struct usb_serial *serial = port->serial;
|
|
||||||
struct pl2303_private *priv = usb_get_serial_port_data(port);
|
struct pl2303_private *priv = usb_get_serial_port_data(port);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
u8 control;
|
u8 control;
|
||||||
@ -549,17 +548,11 @@ static int pl2303_tiocmset(struct tty_struct *tty,
|
|||||||
control = priv->line_control;
|
control = priv->line_control;
|
||||||
spin_unlock_irqrestore(&priv->lock, flags);
|
spin_unlock_irqrestore(&priv->lock, flags);
|
||||||
|
|
||||||
mutex_lock(&serial->disc_mutex);
|
ret = pl2303_set_control_lines(port, control);
|
||||||
if (!serial->disconnected) {
|
if (ret)
|
||||||
ret = pl2303_set_control_lines(port, control);
|
return usb_translate_errors(ret);
|
||||||
if (ret)
|
|
||||||
ret = usb_translate_errors(ret);
|
|
||||||
} else {
|
|
||||||
ret = -ENODEV;
|
|
||||||
}
|
|
||||||
mutex_unlock(&serial->disc_mutex);
|
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pl2303_tiocmget(struct tty_struct *tty)
|
static int pl2303_tiocmget(struct tty_struct *tty)
|
||||||
|
Loading…
Reference in New Issue
Block a user