Commit 352cf636 authored by Alexander Viro's avatar Alexander Viro Committed by Christoph Hellwig

[PATCH] tty cleanups (1/12)

	Christoph's fix for devfs problems with pty.
parent 8d1f37c2
......@@ -95,7 +95,6 @@ static void pty_close(struct tty_struct * tty, struct file * filp)
}
}
#endif
tty_unregister_device (&tty->link->driver, minor(tty->device));
tty_vhangup(tty->link);
}
}
......@@ -448,17 +447,14 @@ int __init pty_init(void)
init_waitqueue_head(&ptm_state[i][j].open_wait);
pts_driver[i] = pty_slave_driver;
#ifdef CONFIG_DEVFS_FS
pts_driver[i].name = "pts/%d";
#else
pts_driver[i].name = "pts";
#endif
pts_driver[i].proc_entry = 0;
pts_driver[i].major = UNIX98_PTY_SLAVE_MAJOR+i;
pts_driver[i].minor_start = 0;
pts_driver[i].name_base = i*NR_PTYS;
pts_driver[i].num = ptm_driver[i].num;
pts_driver[i].other = &ptm_driver[i];
pts_driver[i].flags |= TTY_DRIVER_NO_DEVFS;
pts_driver[i].table = pts_table[i];
pts_driver[i].termios = pts_termios[i];
pts_driver[i].termios_locked = pts_termios_locked[i];
......
......@@ -2215,6 +2215,7 @@ int tty_unregister_driver(struct tty_driver *driver)
driver->termios_locked[i] = NULL;
kfree(tp);
}
if (!(driver->flags & TTY_DRIVER_NO_DEVFS))
tty_unregister_device(driver, driver->minor_start + i);
}
proc_tty_unregister_driver(driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment