USB: opticon: 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
94c51dca2c
commit
94bcef6245
1 changed files with 4 additions and 12 deletions
|
@ -309,7 +309,6 @@ static int opticon_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 opticon_private *priv = usb_get_serial_port_data(port);
|
struct opticon_private *priv = usb_get_serial_port_data(port);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
bool rts;
|
bool rts;
|
||||||
|
@ -330,18 +329,11 @@ static int opticon_tiocmset(struct tty_struct *tty,
|
||||||
if (!changed)
|
if (!changed)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Send the new RTS state to the connected device */
|
|
||||||
mutex_lock(&serial->disc_mutex);
|
|
||||||
if (!serial->disconnected) {
|
|
||||||
ret = send_control_msg(port, CONTROL_RTS, !rts);
|
ret = send_control_msg(port, CONTROL_RTS, !rts);
|
||||||
if (ret)
|
if (ret)
|
||||||
ret = usb_translate_errors(ret);
|
return usb_translate_errors(ret);
|
||||||
} else {
|
|
||||||
ret = -ENODEV;
|
|
||||||
}
|
|
||||||
mutex_unlock(&serial->disc_mutex);
|
|
||||||
|
|
||||||
return ret;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_serial_info(struct usb_serial_port *port,
|
static int get_serial_info(struct usb_serial_port *port,
|
||||||
|
|
Loading…
Add table
Reference in a new issue