diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-01-30 15:14:31 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-02 18:10:46 -0500 |
commit | a50f724a432997321cabb6c9e665c28e34850f78 (patch) | |
tree | 19e42720b0bb67bb513a2b81364d97cb66498620 /drivers/tty/pty.c | |
parent | 81f5835eae424be646753ec5a044ed4db1fcc09a (diff) |
TTY: pty, remove superfluous ptm test
The code looks like:
if (tty->driver->subtype == PTY_TYPE_MASTER) {
...
if (tty->driver == ptm_driver)
But the second if is superfluous because only the ptm_driver is of
PTY_TYPE_MASTER subtype.
Also we can remove the #if now because devpts_pty_kill is defined as
an empty function for non-CONFIG_UNIX98_PTYS configs.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/pty.c')
-rw-r--r-- | drivers/tty/pty.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index d505837b3478..ddec9f3c3396 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
@@ -54,10 +54,7 @@ static void pty_close(struct tty_struct *tty, struct file *filp) | |||
54 | wake_up_interruptible(&tty->link->write_wait); | 54 | wake_up_interruptible(&tty->link->write_wait); |
55 | if (tty->driver->subtype == PTY_TYPE_MASTER) { | 55 | if (tty->driver->subtype == PTY_TYPE_MASTER) { |
56 | set_bit(TTY_OTHER_CLOSED, &tty->flags); | 56 | set_bit(TTY_OTHER_CLOSED, &tty->flags); |
57 | #ifdef CONFIG_UNIX98_PTYS | 57 | devpts_pty_kill(tty->link); |
58 | if (tty->driver == ptm_driver) | ||
59 | devpts_pty_kill(tty->link); | ||
60 | #endif | ||
61 | tty_unlock(); | 58 | tty_unlock(); |
62 | tty_vhangup(tty->link); | 59 | tty_vhangup(tty->link); |
63 | tty_lock(); | 60 | tty_lock(); |