[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1327954472-26594-4-git-send-email-jslaby@suse.cz>
Date: Mon, 30 Jan 2012 21:14:31 +0100
From: Jiri Slaby <jslaby@...e.cz>
To: gregkh@...e.de
Cc: linux-kernel@...r.kernel.org, alan@...ux.intel.com,
jirislaby@...il.com
Subject: [PATCH 4/5] 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@...e.cz>
---
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 d505837..ddec9f3 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)
wake_up_interruptible(&tty->link->write_wait);
if (tty->driver->subtype == PTY_TYPE_MASTER) {
set_bit(TTY_OTHER_CLOSED, &tty->flags);
-#ifdef CONFIG_UNIX98_PTYS
- if (tty->driver == ptm_driver)
- devpts_pty_kill(tty->link);
-#endif
+ devpts_pty_kill(tty->link);
tty_unlock();
tty_vhangup(tty->link);
tty_lock();
--
1.7.8.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists