Lines Matching refs:tty
308 static void hvcs_unthrottle(struct tty_struct *tty);
309 static void hvcs_throttle(struct tty_struct *tty);
312 static int hvcs_write(struct tty_struct *tty,
314 static int hvcs_write_room(struct tty_struct *tty);
315 static int hvcs_chars_in_buffer(struct tty_struct *tty);
329 static int hvcs_open(struct tty_struct *tty, struct file *filp);
330 static void hvcs_close(struct tty_struct *tty, struct file *filp);
331 static void hvcs_hangup(struct tty_struct * tty);
518 static void hvcs_unthrottle(struct tty_struct *tty) in hvcs_unthrottle() argument
520 struct hvcs_struct *hvcsd = tty->driver_data; in hvcs_unthrottle()
529 static void hvcs_throttle(struct tty_struct *tty) in hvcs_throttle() argument
531 struct hvcs_struct *hvcsd = tty->driver_data; in hvcs_throttle()
561 struct tty_struct *tty = hvcsd->port.tty; in hvcs_try_write() local
581 if (tty) { in hvcs_try_write()
582 tty_wakeup(tty); in hvcs_try_write()
591 struct tty_struct *tty; in hvcs_io() local
599 tty = hvcsd->port.tty; in hvcs_io()
603 if (!tty || test_bit(TTY_THROTTLED, &tty->flags)) { in hvcs_io()
842 struct tty_struct *tty; in hvcs_remove() local
851 tty = hvcsd->port.tty; in hvcs_remove()
866 if (tty) in hvcs_remove()
867 tty_hangup(tty); in hvcs_remove()
1100 static int hvcs_install(struct tty_driver *driver, struct tty_struct *tty) in hvcs_install() argument
1112 hvcsd = hvcs_get_by_index(tty->index); in hvcs_install()
1115 " with tty->index %d.\n", tty->index); in hvcs_install()
1131 hvcsd->port.tty = tty; in hvcs_install()
1132 tty->driver_data = hvcsd; in hvcs_install()
1157 retval = tty_port_install(&hvcsd->port, driver, tty); in hvcs_install()
1177 static int hvcs_open(struct tty_struct *tty, struct file *filp) in hvcs_open() argument
1179 struct hvcs_struct *hvcsd = tty->driver_data; in hvcs_open()
1195 static void hvcs_close(struct tty_struct *tty, struct file *filp) in hvcs_close() argument
1213 if (!tty->driver_data) in hvcs_close()
1216 hvcsd = tty->driver_data; in hvcs_close()
1228 hvcsd->port.tty = NULL; in hvcs_close()
1233 tty_wait_until_sent_from_close(tty, HVCS_CLOSE_WAIT); in hvcs_close()
1240 tty->driver_data = NULL; in hvcs_close()
1253 static void hvcs_cleanup(struct tty_struct * tty) in hvcs_cleanup() argument
1255 struct hvcs_struct *hvcsd = tty->driver_data; in hvcs_cleanup()
1260 static void hvcs_hangup(struct tty_struct * tty) in hvcs_hangup() argument
1262 struct hvcs_struct *hvcsd = tty->driver_data; in hvcs_hangup()
1281 tty->driver_data = NULL; in hvcs_hangup()
1282 hvcsd->port.tty = NULL; in hvcs_hangup()
1320 static int hvcs_write(struct tty_struct *tty, in hvcs_write() argument
1323 struct hvcs_struct *hvcsd = tty->driver_data; in hvcs_write()
1425 static int hvcs_write_room(struct tty_struct *tty) in hvcs_write_room() argument
1427 struct hvcs_struct *hvcsd = tty->driver_data; in hvcs_write_room()
1435 static int hvcs_chars_in_buffer(struct tty_struct *tty) in hvcs_chars_in_buffer() argument
1437 struct hvcs_struct *hvcsd = tty->driver_data; in hvcs_chars_in_buffer()