diff options
author | Alan Cox <alan@linux.intel.com> | 2009-06-11 11:50:58 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 15:51:01 (GMT) |
commit | f2c4c65c8350d885d74dcdea7061dcecc1223c36 (patch) | |
tree | 2c6b9229664ae877abea4726328f8793bbc15eb7 | |
parent | c65c9bc3efa5589f691276bb9db689119a711222 (diff) | |
download | linux-f2c4c65c8350d885d74dcdea7061dcecc1223c36.tar.xz |
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.c | 21 | ||||
-rw-r--r-- | drivers/char/tty_ldisc.c | 21 |
2 files changed, 21 insertions, 21 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index 2f44b0b..939e198 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c @@ -471,27 +471,6 @@ void tty_wakeup(struct tty_struct *tty) EXPORT_SYMBOL_GPL(tty_wakeup); /** - * tty_ldisc_flush - flush line discipline queue - * @tty: tty - * - * Flush the line discipline queue (if any) for this tty. If there - * is no line discipline active this is a no-op. - */ - -void tty_ldisc_flush(struct tty_struct *tty) -{ - struct tty_ldisc *ld = tty_ldisc_ref(tty); - if (ld) { - if (ld->ops->flush_buffer) - ld->ops->flush_buffer(tty); - tty_ldisc_deref(ld); - } - tty_buffer_flush(tty); -} - -EXPORT_SYMBOL_GPL(tty_ldisc_flush); - -/** * do_tty_hangup - actual handler for hangup events * @work: tty device * diff --git a/drivers/char/tty_ldisc.c b/drivers/char/tty_ldisc.c index a58a19a..01c70c0 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) } /** + * tty_ldisc_flush - flush line discipline queue + * @tty: tty + * + * Flush the line discipline queue (if any) for this tty. If there + * is no line discipline active this is a no-op. + */ + +void tty_ldisc_flush(struct tty_struct *tty) +{ + struct tty_ldisc *ld = tty_ldisc_ref(tty); + if (ld) { + if (ld->ops->flush_buffer) + ld->ops->flush_buffer(tty); + tty_ldisc_deref(ld); + } + tty_buffer_flush(tty); +} + +EXPORT_SYMBOL_GPL(tty_ldisc_flush); + +/** * tty_set_termios_ldisc - set ldisc field * @tty: tty structure * @num: line discipline number |