mirror of
https://github.com/opnsense/src.git
synced 2026-03-24 19:53:08 -04:00
Get rid of ttyregister(). All drivers now use ttymalloc() for struct
tty, so now we stand a chance of implementing refcounting and getting rid of the damn things again.
This commit is contained in:
parent
9130089b9d
commit
d1afdc6644
2 changed files with 2 additions and 9 deletions
|
|
@ -2641,7 +2641,8 @@ ttymalloc(struct tty *tp)
|
|||
if (tp)
|
||||
return(tp);
|
||||
tp = malloc(sizeof *tp, M_TTYS, M_WAITOK | M_ZERO);
|
||||
ttyregister(tp);
|
||||
tp->t_timeout = -1;
|
||||
SLIST_INSERT_HEAD(&tty_list, tp, t_list);
|
||||
return (tp);
|
||||
}
|
||||
|
||||
|
|
@ -2657,13 +2658,6 @@ ttyfree(struct tty *tp)
|
|||
}
|
||||
#endif /* 0 */
|
||||
|
||||
void
|
||||
ttyregister(struct tty *tp)
|
||||
{
|
||||
tp->t_timeout = -1;
|
||||
SLIST_INSERT_HEAD(&tty_list, tp, t_list);
|
||||
}
|
||||
|
||||
static int
|
||||
sysctl_kern_ttys(SYSCTL_HANDLER_ARGS)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -306,7 +306,6 @@ int ttylclose(struct tty *tp, int flag);
|
|||
struct tty *ttymalloc(struct tty *tp);
|
||||
int ttymodem(struct tty *tp, int flag);
|
||||
int ttyopen(dev_t device, struct tty *tp);
|
||||
void ttyregister(struct tty *tp);
|
||||
int ttysleep(struct tty *tp, void *chan, int pri, char *wmesg, int timo);
|
||||
int ttywait(struct tty *tp);
|
||||
int unputc(struct clist *q);
|
||||
|
|
|
|||
Loading…
Reference in a new issue