Lines Matching defs:tty
27 #include <linux/tty.h>
307 struct tty_struct *tty;
310 tty = tty_port_tty_get(&mp->port);
311 if (tty) {
312 tty_vhangup(tty);
313 tty_kref_put(tty);
324 struct tty_struct *tty;
327 tty = tty_port_tty_get(&mp->port);
328 if (tty) {
329 count = tty->count;
330 tty_kref_put(tty);
408 struct tty_struct *tty;
414 tty = tty_port_tty_get(&mp->port);
415 if (!tty) {
420 ld = tty_ldisc_ref(tty);
434 pr_debug("capi: recv tty throttled\n");
438 if (tty->receive_room < datalen) {
439 pr_debug("capi: no room in tty\n");
457 ld->ops->receive_buf(tty, skb->data, NULL, skb->len);
475 tty_kref_put(tty);
492 struct tty_struct *tty;
498 tty = tty_port_tty_get(&mp->port);
499 if (!tty)
503 pr_debug("capi: send: tty stopped\n");
504 tty_kref_put(tty);
566 tty_kref_put(tty);
1041 capinc_tty_install(struct tty_driver *driver, struct tty_struct *tty)
1043 struct capiminor *mp = capiminor_get(tty->index);
1044 int ret = tty_standard_install(driver, tty);
1047 tty->driver_data = mp;
1053 static void capinc_tty_cleanup(struct tty_struct *tty)
1055 struct capiminor *mp = tty->driver_data;
1056 tty->driver_data = NULL;
1060 static int capinc_tty_open(struct tty_struct *tty, struct file *filp)
1062 struct capiminor *mp = tty->driver_data;
1065 err = tty_port_open(&mp->port, tty, filp);
1073 static void capinc_tty_close(struct tty_struct *tty, struct file *filp)
1075 struct capiminor *mp = tty->driver_data;
1077 tty_port_close(&mp->port, tty, filp);
1080 static ssize_t capinc_tty_write(struct tty_struct *tty, const u8 *buf,
1083 struct capiminor *mp = tty->driver_data;
1115 static int capinc_tty_put_char(struct tty_struct *tty, u8 ch)
1117 struct capiminor *mp = tty->driver_data;
1156 static void capinc_tty_flush_chars(struct tty_struct *tty)
1158 struct capiminor *mp = tty->driver_data;
1176 static unsigned int capinc_tty_write_room(struct tty_struct *tty)
1178 struct capiminor *mp = tty->driver_data;
1187 static unsigned int capinc_tty_chars_in_buffer(struct tty_struct *tty)
1189 struct capiminor *mp = tty->driver_data;
1198 static void capinc_tty_throttle(struct tty_struct *tty)
1200 struct capiminor *mp = tty->driver_data;
1204 static void capinc_tty_unthrottle(struct tty_struct *tty)
1206 struct capiminor *mp = tty->driver_data;
1212 static void capinc_tty_stop(struct tty_struct *tty)
1214 struct capiminor *mp = tty->driver_data;
1219 static void capinc_tty_start(struct tty_struct *tty)
1221 struct capiminor *mp = tty->driver_data;
1227 static void capinc_tty_hangup(struct tty_struct *tty)
1229 struct capiminor *mp = tty->driver_data;
1234 static void capinc_tty_send_xchar(struct tty_struct *tty, char ch)