diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-10 12:17:45 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-10 12:17:45 +0300 |
commit | 9c96f401e91a4358eb4a5e227c1521dea1c20127 (patch) | |
tree | e8a0b78324510ba6133c58cc05b2cb2f3876745e /drivers/tty/tty_io.c | |
parent | 1528e40fd7d382e9668d3a1876a83d30bb04d554 (diff) | |
parent | 40e020c129cfc991e8ab4736d2665351ffd1468d (diff) | |
download | linux-9c96f401e91a4358eb4a5e227c1521dea1c20127.tar.xz |
Merge 4.20-rc6 into tty-next
We want the TTY changes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r-- | drivers/tty/tty_io.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 57d06eda5b2f..bfe9ad85b362 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -1375,7 +1375,13 @@ err_release_lock: return ERR_PTR(retval); } -static void tty_free_termios(struct tty_struct *tty) +/** + * tty_save_termios() - save tty termios data in driver table + * @tty: tty whose termios data to save + * + * Locking: Caller guarantees serialisation with tty_init_termios(). + */ +void tty_save_termios(struct tty_struct *tty) { struct ktermios *tp; int idx = tty->index; @@ -1394,6 +1400,7 @@ static void tty_free_termios(struct tty_struct *tty) } *tp = tty->termios; } +EXPORT_SYMBOL_GPL(tty_save_termios); /** * tty_flush_works - flush all works of a tty/pty pair @@ -1493,7 +1500,7 @@ static void release_tty(struct tty_struct *tty, int idx) WARN_ON(!mutex_is_locked(&tty_mutex)); if (tty->ops->shutdown) tty->ops->shutdown(tty); - tty_free_termios(tty); + tty_save_termios(tty); tty_driver_remove_tty(tty->driver, tty); tty->port->itty = NULL; if (tty->link) |