Lines Matching defs:tty

23 #include <linux/tty.h>
87 struct tty_struct *tty; /* ptr to TTY structure */
149 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
151 actual = sp->tty->ops->write(sp->tty, sp->xbuff, sp->status2);
155 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
195 set_bit(TTY_DO_WRITE_WAKEUP, &sp->tty->flags);
221 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
223 actual = sp->tty->ops->write(sp->tty, sp->xbuff, count);
227 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
269 if (sp->tty == NULL)
280 if (sp->tty) {
282 clear_bit(TTY_DO_WRITE_WAKEUP, &sp->tty->flags);
367 * We have a potential race on dereferencing tty->disc_data, because the tty
370 * tty->disc_data and frees the memory that sixpack_receive_buf is using. The
371 * best way to fix this is to use a rwlock in the tty struct, but for now we
376 static struct sixpack *sp_get(struct tty_struct *tty)
381 sp = tty->disc_data;
399 static void sixpack_write_wakeup(struct tty_struct *tty)
401 struct sixpack *sp = sp_get(tty);
410 clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
417 actual = tty->ops->write(tty, sp->xhead, sp->xleft);
430 * This function is called by the tty module in the kernel when
434 static void sixpack_receive_buf(struct tty_struct *tty,
443 sp = sp_get(tty);
460 tty_unthrottle(tty);
521 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
522 sp->tty->ops->write(sp->tty, &resync_cmd, 1);
535 sp->tty->ops->write(sp->tty, &inbyte, 1);
546 * sure the tty line exists, we only have to link it to
549 static int sixpack_open(struct tty_struct *tty)
559 if (tty->ops->write == NULL)
590 sp->tty = tty;
623 tty->disc_data = sp;
624 tty->receive_room = 65536;
652 static void sixpack_close(struct tty_struct *tty)
657 sp = tty->disc_data;
658 tty->disc_data = NULL;
689 static int sixpack_ioctl(struct tty_struct *tty, struct file *file,
692 struct sixpack *sp = sp_get(tty);
743 err = tty_mode_ioctl(tty, file, cmd, arg);
886 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
888 actual = sp->tty->ops->write(sp->tty, sp->xbuff, sp->status2);
898 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
922 sp->tty->ops->write(sp->tty, &sp->led_state, 1);
927 sp->tty->ops->write(sp->tty, &sp->led_state, 1);