netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.cz>, Samuel Ortiz <samuel@sortiz.org>,
	"David S. Miller" <davem@davemloft.net>,
	Peter Hurley <peter@hurleysoftware.com>,
	Alan Cox <alan@linux.intel.com>,
	linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-serial@vger.kernel.org, netdev@vger.kernel.org,
	ZIV-Asier Llano Palacios <asier.llano@cgglobal.com>,
	Johan Hovold <johan@kernel.org>
Subject: [PATCH 2/5] TTY: bfin_jtag_comm: remove incorrect wait_until_sent operation
Date: Wed,  4 Mar 2015 10:39:04 +0100	[thread overview]
Message-ID: <1425461947-15888-3-git-send-email-johan@kernel.org> (raw)
In-Reply-To: <1425461947-15888-1-git-send-email-johan@kernel.org>

Remove incorrect and redundant wait_until_sent operation, which waits
for the driver buffer rather than any hardware buffers to drain,
something which is already taken care of by the tty layer (and
chars_in_buffer).

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/tty/bfin_jtag_comm.c | 13 -------------
 1 file changed, 13 deletions(-)

diff --git a/drivers/tty/bfin_jtag_comm.c b/drivers/tty/bfin_jtag_comm.c
index d7b198c400c7..ce24182f8514 100644
--- a/drivers/tty/bfin_jtag_comm.c
+++ b/drivers/tty/bfin_jtag_comm.c
@@ -210,18 +210,6 @@ bfin_jc_chars_in_buffer(struct tty_struct *tty)
 	return circ_cnt(&bfin_jc_write_buf);
 }
 
-static void
-bfin_jc_wait_until_sent(struct tty_struct *tty, int timeout)
-{
-	unsigned long expire = jiffies + timeout;
-	while (!circ_empty(&bfin_jc_write_buf)) {
-		if (signal_pending(current))
-			break;
-		if (time_after(jiffies, expire))
-			break;
-	}
-}
-
 static const struct tty_operations bfin_jc_ops = {
 	.open            = bfin_jc_open,
 	.close           = bfin_jc_close,
@@ -230,7 +218,6 @@ static const struct tty_operations bfin_jc_ops = {
 	.flush_chars     = bfin_jc_flush_chars,
 	.write_room      = bfin_jc_write_room,
 	.chars_in_buffer = bfin_jc_chars_in_buffer,
-	.wait_until_sent = bfin_jc_wait_until_sent,
 };
 
 static int __init bfin_jc_init(void)
-- 
2.0.5

  parent reply	other threads:[~2015-03-04  9:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-04  9:39 [PATCH 0/5] TTY: fix tty_wait_until_sent on 64-bit machines Johan Hovold
2015-03-04  9:39 ` [PATCH 1/5] net: irda: fix wait_until_sent poll timeout Johan Hovold
2015-03-04  9:39 ` Johan Hovold [this message]
2015-03-05 14:33   ` [PATCH 2/5] TTY: bfin_jtag_comm: remove incorrect wait_until_sent operation Peter Hurley
2015-03-04  9:39 ` [PATCH 3/5] USB: serial: fix infinite wait_until_sent timeout Johan Hovold
2015-03-04  9:39 ` [PATCH 4/5] TTY: fix tty_wait_until_sent on 64-bit machines Johan Hovold
2015-03-05 14:31   ` Peter Hurley
2015-03-04  9:39 ` [PATCH 5/5] TTY: fix tty_wait_until_sent maximum timeout Johan Hovold
2015-03-05 14:32   ` Peter Hurley
2015-03-07  2:43 ` [PATCH 0/5] TTY: fix tty_wait_until_sent on 64-bit machines Greg Kroah-Hartman

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=1425461947-15888-3-git-send-email-johan@kernel.org \
    --to=johan@kernel.org \
    --cc=alan@linux.intel.com \
    --cc=asier.llano@cgglobal.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=peter@hurleysoftware.com \
    --cc=samuel@sortiz.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).