Lines Matching refs:driver
49 if (tty->driver->subtype == PTY_TYPE_MASTER)
69 if (tty->driver->subtype == PTY_TYPE_MASTER) {
72 if (tty->driver == ptm_driver) {
229 if (tty->driver->subtype == PTY_TYPE_SLAVE && tty->link->count != 1)
350 * @driver: the pty driver
359 static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty,
368 if (driver->subtype != PTY_TYPE_MASTER)
375 if (!try_module_get(driver->other->owner)) {
379 o_tty = alloc_tty_struct(driver->other, idx);
392 driver->other->ttys[idx] = o_tty;
393 driver->ttys[idx] = tty;
396 tty->termios = driver->init_termios;
398 o_tty->termios = driver->other->init_termios;
404 tty_driver_kref_get(driver->other);
418 tty_driver_kref_get(driver);
424 module_put(driver->other->owner);
439 static int pty_install(struct tty_driver *driver, struct tty_struct *tty)
441 return pty_common_install(driver, tty, true);
444 static void pty_remove(struct tty_driver *driver, struct tty_struct *tty)
448 driver->ttys[tty->index] = NULL;
450 pair->driver->ttys[pair->index] = NULL;
541 panic("Couldn't allocate pty driver");
548 panic("Couldn't allocate pty slave driver");
580 panic("Couldn't register pty driver");
582 panic("Couldn't register pty slave driver");
609 if (tty->driver != ptm_driver)
680 * @driver: ptm driver
688 static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
697 * @driver: pts driver
705 static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver,
719 static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty)
721 return pty_common_install(driver, tty, false);
725 static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty)
729 if (tty->driver->subtype == PTY_TYPE_MASTER)
783 * Allocate a unix98 pty master device from the ptmx driver.
882 panic("Couldn't allocate Unix98 ptm driver");
890 panic("Couldn't allocate Unix98 pts driver");
922 panic("Couldn't register Unix98 ptm driver");
924 panic("Couldn't register Unix98 pts driver");
933 panic("Couldn't register /dev/ptmx driver");