summaryrefslogtreecommitdiffstats
path: root/drivers/tty/pty.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2014-11-05 12:13:02 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-05 18:50:42 -0800
commit2febdb632bb96235b94b8fccaf882a78f8f4b2bb (patch)
treef4740b43b225a863f05df7edb59d3b3badfdb445 /drivers/tty/pty.c
parent2aff5e2bc62db43e05c814461a08aff0fc2b7fe5 (diff)
downloadlinux-2febdb632bb96235b94b8fccaf882a78f8f4b2bb.tar.gz
linux-2febdb632bb96235b94b8fccaf882a78f8f4b2bb.tar.bz2
linux-2febdb632bb96235b94b8fccaf882a78f8f4b2bb.zip
tty: Preset lock subclass for nested tty locks
Eliminate the requirement of specifying the tty lock nesting at lock time; instead, set the lock subclass for slave ptys at pty install (normal ttys and master ptys use subclass 0). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/pty.c')
-rw-r--r--drivers/tty/pty.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index bdb8fd1a2026..11db7dc8676b 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -399,6 +399,8 @@ static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty,
if (!o_tty)
goto err_put_module;
+ tty_set_lock_subclass(o_tty);
+
if (legacy) {
/* We always use new tty termios data so we can do this
the easy way .. */