Lines Matching refs:tty

23 #include <linux/tty.h>
87 struct tty_struct *tty; /* ptr to TTY structure */
150 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
152 actual = sp->tty->ops->write(sp->tty, sp->xbuff, sp->status2);
156 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
191 set_bit(TTY_DO_WRITE_WAKEUP, &sp->tty->flags);
217 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
219 actual = sp->tty->ops->write(sp->tty, sp->xbuff, count);
223 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
265 if (sp->tty == NULL)
276 if (sp->tty) {
278 clear_bit(TTY_DO_WRITE_WAKEUP, &sp->tty->flags);
363 * We have a potential race on dereferencing tty->disc_data, because the tty
366 * tty->disc_data and frees the memory that sixpack_receive_buf is using. The
367 * best way to fix this is to use a rwlock in the tty struct, but for now we
372 static struct sixpack *sp_get(struct tty_struct *tty)
377 sp = tty->disc_data;
395 static void sixpack_write_wakeup(struct tty_struct *tty)
397 struct sixpack *sp = sp_get(tty);
406 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
413 actual = tty->ops->write(tty, sp->xhead, sp->xleft);
426 * This function is called by the tty module in the kernel when
430 static void sixpack_receive_buf(struct tty_struct *tty, const u8 *cp,
439 sp = sp_get(tty);
456 tty_unthrottle(tty);
517 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
518 sp->tty->ops->write(sp->tty, &resync_cmd, 1);
531 sp->tty->ops->write(sp->tty, &inbyte, 1);
542 * sure the tty line exists, we only have to link it to
545 static int sixpack_open(struct tty_struct *tty)
555 if (tty->ops->write == NULL)
587 sp->tty = tty;
620 tty->disc_data = sp;
621 tty->receive_room = 65536;
649 static void sixpack_close(struct tty_struct *tty)
654 sp = tty->disc_data;
655 tty->disc_data = NULL;
686 static int sixpack_ioctl(struct tty_struct *tty, unsigned int cmd,
689 struct sixpack *sp = sp_get(tty);
738 err = tty_mode_ioctl(tty, cmd, arg);
876 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
878 actual = sp->tty->ops->write(sp->tty, sp->xbuff, sp->status2);
888 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
912 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
917 sp->tty->ops->write(sp->tty, &sp->led_state, 1);