aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/pl2303.c
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2013-03-21 07:37:45 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-25 16:54:32 -0400
commit5ddbb26b8b571231cace9f013b2d0ae66229b316 (patch)
treeb9c15798a5be3287edfcf560d15311cb87fee697 /drivers/usb/serial/pl2303.c
parentaff5b323b319758257a838cdc45f494c6674447c (diff)
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>
Diffstat (limited to 'drivers/usb/serial/pl2303.c')
-rw-r--r--drivers/usb/serial/pl2303.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 4dff17902fa0..7151659367a0 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -531,7 +531,6 @@ static int pl2303_tiocmset(struct tty_struct *tty,
531 unsigned int set, unsigned int clear) 531 unsigned int set, unsigned int clear)
532{ 532{
533 struct usb_serial_port *port = tty->driver_data; 533 struct usb_serial_port *port = tty->driver_data;
534 struct usb_serial *serial = port->serial;
535 struct pl2303_private *priv = usb_get_serial_port_data(port); 534 struct pl2303_private *priv = usb_get_serial_port_data(port);
536 unsigned long flags; 535 unsigned long flags;
537 u8 control; 536 u8 control;
@@ -549,17 +548,11 @@ static int pl2303_tiocmset(struct tty_struct *tty,
549 control = priv->line_control; 548 control = priv->line_control;
550 spin_unlock_irqrestore(&priv->lock, flags); 549 spin_unlock_irqrestore(&priv->lock, flags);
551 550
552 mutex_lock(&serial->disc_mutex); 551 ret = pl2303_set_control_lines(port, control);
553 if (!serial->disconnected) { 552 if (ret)
554 ret = pl2303_set_control_lines(port, control); 553 return usb_translate_errors(ret);
555 if (ret)
556 ret = usb_translate_errors(ret);
557 } else {
558 ret = -ENODEV;
559 }
560 mutex_unlock(&serial->disc_mutex);
561 554
562 return ret; 555 return 0;
563} 556}
564 557
565static int pl2303_tiocmget(struct tty_struct *tty) 558static int pl2303_tiocmget(struct tty_struct *tty)