aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/cypress_m8.c
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-09-19 16:13:33 -0400
committerLive-CD User <linux@linux.site>2009-09-19 16:13:33 -0400
commitfe1ae7fdd2ee603f2d95f04e09a68f7f79045127 (patch)
tree1234647e3bd970cfb105dab1c4f0ad2cd14ce179 /drivers/usb/serial/cypress_m8.c
parentba15ab0e8de0d4439a91342ad52d55ca9e313f3d (diff)
tty: USB serial termios bits
Various drivers have hacks to mangle termios structures. This stems from the fact there is no nice setup hook for configuring the termios settings when the port is created Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/cypress_m8.c')
-rw-r--r--drivers/usb/serial/cypress_m8.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index df1adb9a4367..e0a8b715f2f2 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -657,15 +657,7 @@ static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port)
657 spin_unlock_irqrestore(&priv->lock, flags); 657 spin_unlock_irqrestore(&priv->lock, flags);
658 658
659 /* Set termios */ 659 /* Set termios */
660 result = cypress_write(tty, port, NULL, 0); 660 cypress_send(port);
661
662 if (result) {
663 dev_err(&port->dev,
664 "%s - failed setting the control lines - error %d\n",
665 __func__, result);
666 return result;
667 } else
668 dbg("%s - success setting the control lines", __func__);
669 661
670 if (tty) 662 if (tty)
671 cypress_set_termios(tty, port, &priv->tmp_termios); 663 cypress_set_termios(tty, port, &priv->tmp_termios);
@@ -1003,6 +995,8 @@ static void cypress_set_termios(struct tty_struct *tty,
1003 dbg("%s - port %d", __func__, port->number); 995 dbg("%s - port %d", __func__, port->number);
1004 996
1005 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 */
1006 if (!priv->termios_initialized) { 1000 if (!priv->termios_initialized) {
1007 if (priv->chiptype == CT_EARTHMATE) { 1001 if (priv->chiptype == CT_EARTHMATE) {
1008 *(tty->termios) = tty_std_termios; 1002 *(tty->termios) = tty_std_termios;