Lines Matching refs:driver
50 if (tty->driver->subtype == PTY_TYPE_MASTER)
70 if (tty->driver->subtype == PTY_TYPE_MASTER) {
73 if (tty->driver == ptm_driver) {
240 if (tty->driver->subtype == PTY_TYPE_SLAVE && tty->link->count != 1)
361 * @driver: the pty driver
370 static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty,
379 if (driver->subtype != PTY_TYPE_MASTER)
386 if (!try_module_get(driver->other->owner)) {
390 o_tty = alloc_tty_struct(driver->other, idx);
403 driver->other->ttys[idx] = o_tty;
404 driver->ttys[idx] = tty;
407 tty->termios = driver->init_termios;
409 o_tty->termios = driver->other->init_termios;
415 tty_driver_kref_get(driver->other);
429 tty_driver_kref_get(driver);
435 module_put(driver->other->owner);
450 static int pty_install(struct tty_driver *driver, struct tty_struct *tty)
452 return pty_common_install(driver, tty, true);
455 static void pty_remove(struct tty_driver *driver, struct tty_struct *tty)
458 driver->ttys[tty->index] = NULL;
460 pair->driver->ttys[pair->index] = NULL;
553 panic("Couldn't allocate pty driver");
560 panic("Couldn't allocate pty slave driver");
592 panic("Couldn't register pty driver");
594 panic("Couldn't register pty slave driver");
621 if (tty->driver != ptm_driver)
692 * @driver: ptm driver
699 static struct tty_struct *ptm_unix98_lookup(struct tty_driver *driver,
708 * @driver: pts driver
715 static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver,
729 static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty)
731 return pty_common_install(driver, tty, false);
735 static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty)
739 if (tty->driver->subtype == PTY_TYPE_MASTER)
795 * Allocate a unix98 pty master device from the ptmx driver.
894 panic("Couldn't allocate Unix98 ptm driver");
902 panic("Couldn't allocate Unix98 pts driver");
934 panic("Couldn't register Unix98 ptm driver");
936 panic("Couldn't register Unix98 pts driver");
945 panic("Couldn't register /dev/ptmx driver");