Skip to contentSkip to conversation

removed unused var real_tty on n_tty_ioctl()

PATCH New Alan Cox 1 participant 1 message May 29, 2008 Char and misc drivers

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 removed unused var real_tty on n_tty_ioctl()

From: Alan Cox <[email protected]>

From: Gustavo Fernando Padovan <[email protected]>

Hello,

I noted that the 'struct tty_struct *real_tty' is not used in this function, so I removed the code about 'real_tty'. This little change is on kernel 2.6.25.4, but aplies on 2.6.24 or greater.

---

 drivers/char/tty_ioctl.c |    7 -------
 1 files changed, 0 insertions(+), 7 deletions(-)
drivers/char/tty_ioctl.c +0 -7
index b1a757a..8f81139 100644
@@ -981,16 +981,9 @@ EXPORT_SYMBOL_GPL(tty_perform_flush);
 int n_tty_ioctl(struct tty_struct *tty, struct file *file,
 		       unsigned int cmd, unsigned long arg)
 {
-	struct tty_struct *real_tty;
 	unsigned long flags;
 	int retval;
 
-	if (tty->driver->type == TTY_DRIVER_TYPE_PTY &&
-	    tty->driver->subtype == PTY_TYPE_MASTER)
-		real_tty = tty->link;
-	else
-		real_tty = tty;
-
 	switch (cmd) {
 	case TCXONC:
 		retval = tty_check_change(tty);