summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/quatech2.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-03-07 13:12:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-18 16:21:26 -0700
commite4408ce3c23f8451eff7a2954694598fb8fce833 (patch)
tree310aeb3fe12030b9c69cb20ded75ae56ccd8a82c /drivers/usb/serial/quatech2.c
parent6aad04f21374633bd8cecf25024553d1e11a9522 (diff)
downloadlinux-stable-e4408ce3c23f8451eff7a2954694598fb8fce833.tar.gz
linux-stable-e4408ce3c23f8451eff7a2954694598fb8fce833.tar.bz2
linux-stable-e4408ce3c23f8451eff7a2954694598fb8fce833.zip
TTY: quatech2, remove unneeded is_open
tty->ops->break_ctl cannot be called outside the gap between open and close. So there is no need to check whether the port is open in break_ctl in quatech2. Remove the check and also that member completely. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/quatech2.c')
-rw-r--r--drivers/usb/serial/quatech2.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c
index 00e6c9bac8a3..d8531047b41a 100644
--- a/drivers/usb/serial/quatech2.c
+++ b/drivers/usb/serial/quatech2.c
@@ -116,7 +116,6 @@ struct qt2_serial_private {
};
struct qt2_port_private {
- bool is_open;
u8 device_port;
spinlock_t urb_lock;
@@ -398,7 +397,6 @@ static int qt2_open(struct tty_struct *tty, struct usb_serial_port *port)
return status;
}
- port_priv->is_open = true;
port_priv->device_port = (u8) device_port;
if (tty)
@@ -418,8 +416,6 @@ static void qt2_close(struct usb_serial_port *port)
serial = port->serial;
port_priv = usb_get_serial_port_data(port);
- port_priv->is_open = false;
-
spin_lock_irqsave(&port_priv->urb_lock, flags);
usb_kill_urb(port_priv->write_urb);
port_priv->urb_in_use = false;
@@ -905,12 +901,6 @@ static void qt2_break_ctl(struct tty_struct *tty, int break_state)
port_priv = usb_get_serial_port_data(port);
- if (!port_priv->is_open) {
- dev_err(&port->dev,
- "%s - port is not open\n", __func__);
- return;
- }
-
val = (break_state == -1) ? 1 : 0;
status = qt2_control_msg(port->serial->dev, QT2_BREAK_CONTROL,