aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cypress_m8.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/cypress_m8.c')
-rw-r--r--drivers/usb/serial/cypress_m8.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 59adfe123110..e0a8b715f2f2 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -172,8 +172,7 @@ static int cypress_earthmate_startup(struct usb_serial *serial);
172static int cypress_hidcom_startup(struct usb_serial *serial); 172static int cypress_hidcom_startup(struct usb_serial *serial);
173static int cypress_ca42v2_startup(struct usb_serial *serial); 173static int cypress_ca42v2_startup(struct usb_serial *serial);
174static void cypress_release(struct usb_serial *serial); 174static void cypress_release(struct usb_serial *serial);
175static int cypress_open(struct tty_struct *tty, 175static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port);
176 struct usb_serial_port *port, struct file *filp);
177static void cypress_close(struct usb_serial_port *port); 176static void cypress_close(struct usb_serial_port *port);
178static void cypress_dtr_rts(struct usb_serial_port *port, int on); 177static void cypress_dtr_rts(struct usb_serial_port *port, int on);
179static int cypress_write(struct tty_struct *tty, struct usb_serial_port *port, 178static int cypress_write(struct tty_struct *tty, struct usb_serial_port *port,
@@ -633,8 +632,7 @@ static void cypress_release(struct usb_serial *serial)
633} 632}
634 633
635 634
636static int cypress_open(struct tty_struct *tty, 635static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port)
637 struct usb_serial_port *port, struct file *filp)
638{ 636{
639 struct cypress_private *priv = usb_get_serial_port_data(port); 637 struct cypress_private *priv = usb_get_serial_port_data(port);
640 struct usb_serial *serial = port->serial; 638 struct usb_serial *serial = port->serial;
@@ -659,15 +657,7 @@ static int cypress_open(struct tty_struct *tty,
659 spin_unlock_irqrestore(&priv->lock, flags); 657 spin_unlock_irqrestore(&priv->lock, flags);
660 658
661 /* Set termios */ 659 /* Set termios */
662 result = cypress_write(tty, port, NULL, 0); 660 cypress_send(port);
663
664 if (result) {
665 dev_err(&port->dev,
666 "%s - failed setting the control lines - error %d\n",
667 __func__, result);
668 return result;
669 } else
670 dbg("%s - success setting the control lines", __func__);
671 661
672 if (tty) 662 if (tty)
673 cypress_set_termios(tty, port, &priv->tmp_termios); 663 cypress_set_termios(tty, port, &priv->tmp_termios);
@@ -1005,6 +995,8 @@ static void cypress_set_termios(struct tty_struct *tty,
1005 dbg("%s - port %d", __func__, port->number); 995 dbg("%s - port %d", __func__, port->number);
1006 996
1007 spin_lock_irqsave(&priv->lock, flags); 997 spin_lock_irqsave(&priv->lock, flags);
998 /* We can't clean this one up as we don't know the device type
999 early enough */
1008 if (!priv->termios_initialized) { 1000 if (!priv->termios_initialized) {
1009 if (priv->chiptype == CT_EARTHMATE) { 1001 if (priv->chiptype == CT_EARTHMATE) {
1010 *(tty->termios) = tty_std_termios; 1002 *(tty->termios) = tty_std_termios;