Call ttymalloc() when sysmouse is opened, rather than

when the driver is attached.
MFC after:	2 weeks
This commit is contained in:
Kazutaka YOKOTA 2001-07-06 03:24:40 +00:00
parent d652b3d918
commit e67e345124

View File

@ -86,6 +86,7 @@ smopen(dev_t dev, int flag, int mode, struct proc *p)
tp = dev->si_tty = ttymalloc(dev->si_tty);
if (!(tp->t_state & TS_ISOPEN)) {
sysmouse_tty = tp;
tp->t_oproc = smstart;
tp->t_param = smparam;
tp->t_stop = nottystop;
@ -254,7 +255,6 @@ sm_attach_mouse(void *unused)
dev = make_dev(&sm_cdevsw, SC_MOUSE, UID_ROOT, GID_WHEEL, 0600,
"sysmouse");
dev->si_tty = sysmouse_tty = ttymalloc(sysmouse_tty);
/* sysmouse doesn't have scr_stat */
}