Skip to content

Commit

Permalink
tty: Move ldisc_flush
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Linus Torvalds committed Jun 11, 2009
1 parent c65c9bc commit f2c4c65
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
21 changes: 0 additions & 21 deletions drivers/char/tty_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,27 +470,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
Expand Down
21 changes: 21 additions & 0 deletions drivers/char/tty_ldisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,27 @@ void tty_ldisc_enable(struct tty_struct *tty)
wake_up(&tty_ldisc_wait);
}

/**
* 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
Expand Down

0 comments on commit f2c4c65

Please sign in to comment.