diff options
author | Johan Hovold <jhovold@gmail.com> | 2013-03-21 15:37:43 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-26 00:54:31 +0400 |
commit | 94bcef624548fd2bcf94cb7f9fcbaedbd96d5742 (patch) | |
tree | 74c2e63f54eeb4d33f9e5e3cd9431b7f5003565c /drivers/usb/serial/opticon.c | |
parent | 94c51dca2ce9a3dd0c52ec6f57df4fb3e81e3ec7 (diff) | |
download | linux-94bcef624548fd2bcf94cb7f9fcbaedbd96d5742.tar.xz |
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>
Diffstat (limited to 'drivers/usb/serial/opticon.c')
-rw-r--r-- | drivers/usb/serial/opticon.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 6af5bb810062..5f4b0cd0f6e9 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c @@ -309,7 +309,6 @@ static int opticon_tiocmset(struct tty_struct *tty, unsigned int set, unsigned int clear) { struct usb_serial_port *port = tty->driver_data; - struct usb_serial *serial = port->serial; struct opticon_private *priv = usb_get_serial_port_data(port); unsigned long flags; bool rts; @@ -330,18 +329,11 @@ static int opticon_tiocmset(struct tty_struct *tty, if (!changed) 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); - if (ret) - ret = usb_translate_errors(ret); - } else { - ret = -ENODEV; - } - mutex_unlock(&serial->disc_mutex); + ret = send_control_msg(port, CONTROL_RTS, !rts); + if (ret) + return usb_translate_errors(ret); - return ret; + return 0; } static int get_serial_info(struct usb_serial_port *port, |