From e67e34512403b3435e3cf8ccc69b0ba7cec0b6e3 Mon Sep 17 00:00:00 2001 From: Kazutaka YOKOTA Date: Fri, 6 Jul 2001 03:24:40 +0000 Subject: [PATCH] Call ttymalloc() when sysmouse is opened, rather than when the driver is attached. MFC after: 2 weeks --- sys/dev/syscons/sysmouse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/syscons/sysmouse.c b/sys/dev/syscons/sysmouse.c index 60082e0dbc99..bb38cfe3c0e3 100644 --- a/sys/dev/syscons/sysmouse.c +++ b/sys/dev/syscons/sysmouse.c @@ -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 */ }