summaryrefslogtreecommitdiffstats
path: root/sys/dev/ofw/ofw_console.c
diff options
context:
space:
mode:
authorjake <jake@FreeBSD.org>2002-01-09 04:03:55 +0000
committerjake <jake@FreeBSD.org>2002-01-09 04:03:55 +0000
commitfe9fbb7b3ceac0979a60ddd5a11e723c7339c3d5 (patch)
tree10795e1321718ca638eeece77da2e77707aac165 /sys/dev/ofw/ofw_console.c
parent6d5a228d7f9879b6376575687c6e307e43105f72 (diff)
downloadFreeBSD-src-fe9fbb7b3ceac0979a60ddd5a11e723c7339c3d5.zip
FreeBSD-src-fe9fbb7b3ceac0979a60ddd5a11e723c7339c3d5.tar.gz
Move the make_dev call from the cn_probe to a sysinit that runs at
SI_SUB_DRIVERS. cnprobe is too early.
Diffstat (limited to 'sys/dev/ofw/ofw_console.c')
-rw-r--r--sys/dev/ofw/ofw_console.c10
1 files changed, 9 insertions, 1 deletions
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
OpenPOWER on IntegriCloud