diff options
author | Johan Hovold <johan@kernel.org> | 2015-03-04 04:39:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-06 21:44:14 -0500 |
commit | 6b270fd4db08fc13683d616a733d9cacdd3b4afa (patch) | |
tree | 478e4033a4572db2d662fe37641bc05293cab921 | |
parent | 2c3fbe3cf28fbd7001545a92a83b4f8acfd9fa36 (diff) |
TTY: bfin_jtag_comm: remove incorrect wait_until_sent operation
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>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/bfin_jtag_comm.c | 13 |
1 files changed, 0 insertions, 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) | |||
210 | return circ_cnt(&bfin_jc_write_buf); | 210 | return circ_cnt(&bfin_jc_write_buf); |
211 | } | 211 | } |
212 | 212 | ||
213 | static void | ||
214 | bfin_jc_wait_until_sent(struct tty_struct *tty, int timeout) | ||
215 | { | ||
216 | unsigned long expire = jiffies + timeout; | ||
217 | while (!circ_empty(&bfin_jc_write_buf)) { | ||
218 | if (signal_pending(current)) | ||
219 | break; | ||
220 | if (time_after(jiffies, expire)) | ||
221 | break; | ||
222 | } | ||
223 | } | ||
224 | |||
225 | static const struct tty_operations bfin_jc_ops = { | 213 | static const struct tty_operations bfin_jc_ops = { |
226 | .open = bfin_jc_open, | 214 | .open = bfin_jc_open, |
227 | .close = bfin_jc_close, | 215 | .close = bfin_jc_close, |
@@ -230,7 +218,6 @@ static const struct tty_operations bfin_jc_ops = { | |||
230 | .flush_chars = bfin_jc_flush_chars, | 218 | .flush_chars = bfin_jc_flush_chars, |
231 | .write_room = bfin_jc_write_room, | 219 | .write_room = bfin_jc_write_room, |
232 | .chars_in_buffer = bfin_jc_chars_in_buffer, | 220 | .chars_in_buffer = bfin_jc_chars_in_buffer, |
233 | .wait_until_sent = bfin_jc_wait_until_sent, | ||
234 | }; | 221 | }; |
235 | 222 | ||
236 | static int __init bfin_jc_init(void) | 223 | static int __init bfin_jc_init(void) |