Lines Matching refs:tty
311 static void hvc_unthrottle(struct tty_struct *tty) in hvc_unthrottle() argument
316 static int hvc_install(struct tty_driver *driver, struct tty_struct *tty) in hvc_install() argument
322 if (!(hp = hvc_get_by_index(tty->index))) in hvc_install()
325 tty->driver_data = hp; in hvc_install()
327 rc = tty_port_install(&hp->port, driver, tty); in hvc_install()
337 static int hvc_open(struct tty_struct *tty, struct file * filp) in hvc_open() argument
339 struct hvc_struct *hp = tty->driver_data; in hvc_open()
352 tty_port_tty_set(&hp->port, tty); in hvc_open()
365 tty->driver_data = NULL; in hvc_open()
370 if (C_BAUD(tty)) in hvc_open()
380 static void hvc_close(struct tty_struct *tty, struct file * filp) in hvc_close() argument
393 if (!tty->driver_data) in hvc_close()
396 hp = tty->driver_data; in hvc_close()
405 if (C_HUPCL(tty)) in hvc_close()
420 tty_wait_until_sent_from_close(tty, HVC_CLOSE_WAIT); in hvc_close()
429 static void hvc_cleanup(struct tty_struct *tty) in hvc_cleanup() argument
431 struct hvc_struct *hp = tty->driver_data; in hvc_cleanup()
436 static void hvc_hangup(struct tty_struct *tty) in hvc_hangup() argument
438 struct hvc_struct *hp = tty->driver_data; in hvc_hangup()
496 static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count) in hvc_write() argument
498 struct hvc_struct *hp = tty->driver_data; in hvc_write()
550 struct tty_struct *tty; in hvc_set_winsz() local
555 tty = tty_port_tty_get(&hp->port); in hvc_set_winsz()
556 if (!tty) in hvc_set_winsz()
563 tty_do_resize(tty, &ws); in hvc_set_winsz()
564 tty_kref_put(tty); in hvc_set_winsz()
572 static int hvc_write_room(struct tty_struct *tty) in hvc_write_room() argument
574 struct hvc_struct *hp = tty->driver_data; in hvc_write_room()
582 static int hvc_chars_in_buffer(struct tty_struct *tty) in hvc_chars_in_buffer() argument
584 struct hvc_struct *hp = tty->driver_data; in hvc_chars_in_buffer()
608 struct tty_struct *tty; in hvc_poll() local
629 tty = tty_port_tty_get(&hp->port); in hvc_poll()
630 if (tty == NULL) in hvc_poll()
634 if (test_bit(TTY_THROTTLED, &tty->flags)) in hvc_poll()
658 tty_hangup(tty); in hvc_poll()
697 tty_wakeup(tty); in hvc_poll()
709 tty_kref_put(tty); in hvc_poll()
782 static int hvc_tiocmget(struct tty_struct *tty) in hvc_tiocmget() argument
784 struct hvc_struct *hp = tty->driver_data; in hvc_tiocmget()
791 static int hvc_tiocmset(struct tty_struct *tty, in hvc_tiocmset() argument
794 struct hvc_struct *hp = tty->driver_data; in hvc_tiocmset()
809 struct tty_struct *tty = driver->ttys[0]; in hvc_poll_get_char() local
810 struct hvc_struct *hp = tty->driver_data; in hvc_poll_get_char()
824 struct tty_struct *tty = driver->ttys[0]; in hvc_poll_put_char() local
825 struct hvc_struct *hp = tty->driver_data; in hvc_poll_put_char()
919 struct tty_struct *tty; in hvc_remove() local
921 tty = tty_port_tty_get(&hp->port); in hvc_remove()
946 if (tty) { in hvc_remove()
947 tty_vhangup(tty); in hvc_remove()
948 tty_kref_put(tty); in hvc_remove()