All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Johan Hovold <johan@kernel.org>
Subject: [4/9] USB: serial: cypress_m8: drop unused termios
Date: Sun, 21 Apr 2019 14:21:49 +0200	[thread overview]
Message-ID: <20190421122154.26465-5-johan@kernel.org> (raw)

Drop driver termios structure that held a copy of the tty termios for
no good reason.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/cypress_m8.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 8a06e5ffe644..f9bbbdd1a148 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -108,9 +108,6 @@ struct cypress_private {
 	int baud_rate;			   /* stores current baud rate in
 					      integer form */
 	char prev_status;		   /* used for TIOCMIWAIT */
-	/* we pass a pointer to this as the argument sent to
-	   cypress_set_termios old_termios */
-	struct ktermios tmp_termios; 	   /* stores the old termios settings */
 };
 
 /* function prototypes for the Cypress USB to serial device */
@@ -603,7 +600,7 @@ static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port)
 	cypress_send(port);
 
 	if (tty)
-		cypress_set_termios(tty, port, &priv->tmp_termios);
+		cypress_set_termios(tty, port, NULL);
 
 	/* setup the port and start reading from the device */
 	usb_fill_int_urb(port->interrupt_in_urb, serial->dev,
@@ -899,13 +896,6 @@ static void cypress_set_termios(struct tty_struct *tty,
 
 	cflag = tty->termios.c_cflag;
 
-	/* check if there are new settings */
-	if (old_termios) {
-		spin_lock_irqsave(&priv->lock, flags);
-		priv->tmp_termios = tty->termios;
-		spin_unlock_irqrestore(&priv->lock, flags);
-	}
-
 	/* set number of data bits, parity, stop bits */
 	/* when parity is disabled the parity type bit is ignored */
 

WARNING: multiple messages have this Message-ID (diff)
From: Johan Hovold <johan@kernel.org>
To: linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Johan Hovold <johan@kernel.org>
Subject: [PATCH 4/9] USB: serial: cypress_m8: drop unused termios
Date: Sun, 21 Apr 2019 14:21:49 +0200	[thread overview]
Message-ID: <20190421122154.26465-5-johan@kernel.org> (raw)
Message-ID: <20190421122149.7xrDezV09NiCjSWl0PSxj6yWkrAUQ-l-ppl3DWG0rg0@z> (raw)
In-Reply-To: <20190421122154.26465-1-johan@kernel.org>

Drop driver termios structure that held a copy of the tty termios for
no good reason.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/usb/serial/cypress_m8.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 8a06e5ffe644..f9bbbdd1a148 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -108,9 +108,6 @@ struct cypress_private {
 	int baud_rate;			   /* stores current baud rate in
 					      integer form */
 	char prev_status;		   /* used for TIOCMIWAIT */
-	/* we pass a pointer to this as the argument sent to
-	   cypress_set_termios old_termios */
-	struct ktermios tmp_termios; 	   /* stores the old termios settings */
 };
 
 /* function prototypes for the Cypress USB to serial device */
@@ -603,7 +600,7 @@ static int cypress_open(struct tty_struct *tty, struct usb_serial_port *port)
 	cypress_send(port);
 
 	if (tty)
-		cypress_set_termios(tty, port, &priv->tmp_termios);
+		cypress_set_termios(tty, port, NULL);
 
 	/* setup the port and start reading from the device */
 	usb_fill_int_urb(port->interrupt_in_urb, serial->dev,
@@ -899,13 +896,6 @@ static void cypress_set_termios(struct tty_struct *tty,
 
 	cflag = tty->termios.c_cflag;
 
-	/* check if there are new settings */
-	if (old_termios) {
-		spin_lock_irqsave(&priv->lock, flags);
-		priv->tmp_termios = tty->termios;
-		spin_unlock_irqrestore(&priv->lock, flags);
-	}
-
 	/* set number of data bits, parity, stop bits */
 	/* when parity is disabled the parity type bit is ignored */
 
-- 
2.21.0


             reply	other threads:[~2019-04-21 12:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-21 12:21 Johan Hovold [this message]
2019-04-21 12:21 ` [PATCH 4/9] USB: serial: cypress_m8: drop unused termios Johan Hovold
  -- strict thread matches above, loose matches on Subject: below --
2019-04-21 12:21 [9/9] USB: serial: spcp8x5: simplify init_termios Johan Hovold
2019-04-21 12:21 ` [PATCH 9/9] " Johan Hovold
2019-04-21 12:21 [8/9] USB: serial: oti6858: " Johan Hovold
2019-04-21 12:21 ` [PATCH 8/9] " Johan Hovold
2019-04-21 12:21 [7/9] USB: serial: iuu_phoenix: " Johan Hovold
2019-04-21 12:21 ` [PATCH 7/9] " Johan Hovold
2019-04-21 12:21 [6/9] USB: serial: iuu_phoenix: drop bogus initial cflag Johan Hovold
2019-04-21 12:21 ` [PATCH 6/9] " Johan Hovold
2019-04-21 12:21 [5/9] USB: serial: cypress_m8: clean up initial-termios handling Johan Hovold
2019-04-21 12:21 ` [PATCH 5/9] " Johan Hovold
2019-04-21 12:21 [3/9] USB: serial: cypress_m8: drop unused driver data flag Johan Hovold
2019-04-21 12:21 ` [PATCH 3/9] " Johan Hovold
2019-04-21 12:21 [2/9] USB: serial: ark3116: drop redundant init_termios Johan Hovold
2019-04-21 12:21 ` [PATCH 2/9] " Johan Hovold
2019-04-21 12:21 [1/9] USB: serial: fix initial-termios handling Johan Hovold
2019-04-21 12:21 ` [PATCH 1/9] " Johan Hovold
2019-04-21 12:21 [PATCH 0/9] " Johan Hovold
2019-04-26  6:40 ` Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190421122154.26465-5-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.