summaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-10 09:22:34 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-12-10 09:22:34 +0100
commitc4aa8b2a8b63a269d63acafc0358a7b9f5d9e563 (patch)
treed04a7861e542665bb7c03aac729a72c957be8abc /drivers/tty/tty_io.c
parent48d365de7746a000afd7f9f7cc1821cbb6fe9b45 (diff)
parent40e020c129cfc991e8ab4736d2665351ffd1468d (diff)
downloadblackbird-op-linux-c4aa8b2a8b63a269d63acafc0358a7b9f5d9e563.tar.gz
blackbird-op-linux-c4aa8b2a8b63a269d63acafc0358a7b9f5d9e563.zip
Merge 4.20-rc6 into char-misc-next
This should resolve the hv driver merge conflict. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index ee80dfbd5442..687250ec8032 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1373,7 +1373,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;
@@ -1392,6 +1398,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
@@ -1491,7 +1498,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)
OpenPOWER on IntegriCloud