Lines Matching refs:tty
293 static void hvc_unthrottle(struct tty_struct *tty) in hvc_unthrottle() argument
302 static int hvc_open(struct tty_struct *tty, struct file * filp) in hvc_open() argument
309 if (!(hp = hvc_get_by_index(tty->index))) in hvc_open()
320 tty->driver_data = hp; in hvc_open()
322 hp->tty = tty; in hvc_open()
337 hp->tty = NULL; in hvc_open()
339 tty->driver_data = NULL; in hvc_open()
349 static void hvc_close(struct tty_struct *tty, struct file * filp) in hvc_close() argument
362 if (!tty->driver_data) in hvc_close()
365 hp = tty->driver_data; in hvc_close()
370 hp->tty = NULL; in hvc_close()
384 tty_wait_until_sent(tty, HVC_CLOSE_WAIT); in hvc_close()
395 static void hvc_hangup(struct tty_struct *tty) in hvc_hangup() argument
397 struct hvc_struct *hp = tty->driver_data; in hvc_hangup()
422 hp->tty = NULL; in hvc_hangup()
462 static int hvc_write(struct tty_struct *tty, const unsigned char *buf, int count) in hvc_write() argument
464 struct hvc_struct *hp = tty->driver_data; in hvc_write()
515 struct tty_struct *tty; in hvc_set_winsz() local
523 if (!hp->tty) { in hvc_set_winsz()
528 tty = tty_kref_get(hp->tty); in hvc_set_winsz()
531 tty_do_resize(tty, &ws); in hvc_set_winsz()
532 tty_kref_put(tty); in hvc_set_winsz()
540 static int hvc_write_room(struct tty_struct *tty) in hvc_write_room() argument
542 struct hvc_struct *hp = tty->driver_data; in hvc_write_room()
550 static int hvc_chars_in_buffer(struct tty_struct *tty) in hvc_chars_in_buffer() argument
552 struct hvc_struct *hp = tty->driver_data; in hvc_chars_in_buffer()
576 struct tty_struct *tty; in hvc_poll() local
597 tty = hp->tty; in hvc_poll()
598 if (tty == NULL) in hvc_poll()
602 if (test_bit(TTY_THROTTLED, &tty->flags)) in hvc_poll()
613 int count = tty_buffer_request_room(tty, N_INBUF); in hvc_poll()
626 tty_hangup(tty); in hvc_poll()
650 handle_sysrq(buf[i], tty); in hvc_poll()
656 tty_insert_flip_char(tty, buf[i], 0); in hvc_poll()
665 tty_wakeup(tty); in hvc_poll()
675 tty_flip_buffer_push(tty); in hvc_poll()
808 struct tty_struct *tty; in hvc_remove() local
811 tty = hp->tty; in hvc_remove()
833 if (tty) in hvc_remove()
834 tty_hangup(tty); in hvc_remove()