Lines Matching refs:tty
13 void __lockfunc tty_lock(struct tty_struct *tty) in tty_lock() argument
15 if (tty->magic != TTY_MAGIC) { in tty_lock()
16 pr_err("L Bad %p\n", tty); in tty_lock()
20 tty_kref_get(tty); in tty_lock()
21 mutex_lock(&tty->legacy_mutex); in tty_lock()
25 void __lockfunc tty_unlock(struct tty_struct *tty) in tty_unlock() argument
27 if (tty->magic != TTY_MAGIC) { in tty_unlock()
28 pr_err("U Bad %p\n", tty); in tty_unlock()
32 mutex_unlock(&tty->legacy_mutex); in tty_unlock()
33 tty_kref_put(tty); in tty_unlock()
37 void __lockfunc tty_lock_slave(struct tty_struct *tty) in tty_lock_slave() argument
39 if (tty && tty != tty->link) in tty_lock_slave()
40 tty_lock(tty); in tty_lock_slave()
43 void __lockfunc tty_unlock_slave(struct tty_struct *tty) in tty_unlock_slave() argument
45 if (tty && tty != tty->link) in tty_unlock_slave()
46 tty_unlock(tty); in tty_unlock_slave()
49 void tty_set_lock_subclass(struct tty_struct *tty) in tty_set_lock_subclass() argument
51 lockdep_set_subclass(&tty->legacy_mutex, TTY_LOCK_SLAVE); in tty_set_lock_subclass()