From fe9fbb7b3ceac0979a60ddd5a11e723c7339c3d5 Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 9 Jan 2002 04:03:55 +0000 Subject: Move the make_dev call from the cn_probe to a sysinit that runs at SI_SUB_DRIVERS. cnprobe is too early. --- sys/dev/ofw/ofw_console.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sys/dev/ofw/ofw_console.c') diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c index fef7d84..154f7ff 100644 --- a/sys/dev/ofw/ofw_console.c +++ b/sys/dev/ofw/ofw_console.c @@ -82,6 +82,15 @@ static cn_putc_t ofw_cons_putc; CONS_DRIVER(ofw, ofw_cons_probe, ofw_cons_init, NULL, ofw_cons_getc, ofw_cons_checkc, ofw_cons_putc, NULL); +static void +cn_drvinit(void *unused) +{ + + make_dev(&ofw_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "ofwcons"); +} + +SYSINIT(cndev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,cn_drvinit,NULL) + static int stdin; static int stdout; @@ -254,7 +263,6 @@ ofw_cons_probe(struct consdev *cp) cp->cn_dev = makedev(CDEV_MAJOR, 0); cp->cn_pri = CN_INTERNAL; cp->cn_tp = ofw_tp; - make_dev(&ofw_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "ofwcons"); } static void -- cgit v1.1