aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-06-11 07:50:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-11 11:51:01 -0400
commitf2c4c65c8350d885d74dcdea7061dcecc1223c36 (patch)
tree2c6b9229664ae877abea4726328f8793bbc15eb7
parentc65c9bc3efa5589f691276bb9db689119a711222 (diff)
tty: Move ldisc_flush
We have a tty_ldisc file now so put tty_ldisc_flush in the right place Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/char/tty_io.c21
-rw-r--r--drivers/char/tty_ldisc.c21
2 files changed, 21 insertions, 21 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index 2f44b0b241c3..939e198d7670 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -471,27 +471,6 @@ void tty_wakeup(struct tty_struct *tty)
471EXPORT_SYMBOL_GPL(tty_wakeup); 471EXPORT_SYMBOL_GPL(tty_wakeup);
472 472
473/** 473/**
474 * tty_ldisc_flush - flush line discipline queue
475 * @tty: tty
476 *
477 * Flush the line discipline queue (if any) for this tty. If there
478 * is no line discipline active this is a no-op.
479 */
480
481void tty_ldisc_flush(struct tty_struct *tty)
482{
483 struct tty_ldisc *ld = tty_ldisc_ref(tty);
484 if (ld) {
485 if (ld->ops->flush_buffer)
486 ld->ops->flush_buffer(tty);
487 tty_ldisc_deref(ld);
488 }
489 tty_buffer_flush(tty);
490}
491
492EXPORT_SYMBOL_GPL(tty_ldisc_flush);
493
494/**
495 * do_tty_hangup - actual handler for hangup events 474 * do_tty_hangup - actual handler for hangup events
496 * @work: tty device 475 * @work: tty device
497 * 476 *
diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c
index a58a19a6a5e1..01c70c01f64a 100644
--- a/drivers/char/tty_ldisc.c
+++ b/drivers/char/tty_ldisc.c
@@ -396,6 +396,27 @@ void tty_ldisc_enable(struct tty_struct *tty)
396} 396}
397 397
398/** 398/**
399 * tty_ldisc_flush - flush line discipline queue
400 * @tty: tty
401 *
402 * Flush the line discipline queue (if any) for this tty. If there
403 * is no line discipline active this is a no-op.
404 */
405
406void tty_ldisc_flush(struct tty_struct *tty)
407{
408 struct tty_ldisc *ld = tty_ldisc_ref(tty);
409 if (ld) {
410 if (ld->ops->flush_buffer)
411 ld->ops->flush_buffer(tty);
412 tty_ldisc_deref(ld);
413 }
414 tty_buffer_flush(tty);
415}
416
417EXPORT_SYMBOL_GPL(tty_ldisc_flush);
418
419/**
399 * tty_set_termios_ldisc - set ldisc field 420 * tty_set_termios_ldisc - set ldisc field
400 * @tty: tty structure 421 * @tty: tty structure
401 * @num: line discipline number 422 * @num: line discipline number