diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2014-11-05 18:13:02 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-06 03:50:42 +0100 |
commit | 2febdb632bb96235b94b8fccaf882a78f8f4b2bb (patch) | |
tree | f4740b43b225a863f05df7edb59d3b3badfdb445 /drivers/tty/pty.c | |
parent | tty: Change tty lock order to master->slave (diff) | |
download | linux-2febdb632bb96235b94b8fccaf882a78f8f4b2bb.tar.xz 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.c | 2 |
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 .. */ |