summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ofw/ofw_console.c8
-rw-r--r--sys/dev/sab/sab.c2
-rw-r--r--sys/dev/zs/zs.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ofw/ofw_console.c b/sys/dev/ofw/ofw_console.c
index b835dd1..920733a 100644
--- a/sys/dev/ofw/ofw_console.c
+++ b/sys/dev/ofw/ofw_console.c
@@ -92,15 +92,16 @@ cn_drvinit(void *unused)
{
phandle_t options;
char output[32];
+ dev_t dev;
- if (ofw_consdev.cn_dev != NULL) {
+ if (ofw_consdev.cn_pri != CN_DEAD) {
if ((options = OF_finddevice("/options")) == -1 ||
OF_getprop(options, "output-device", output,
sizeof(output)) == -1)
return;
- make_dev(&ofw_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "%s",
+ dev = make_dev(&ofw_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "%s",
output);
- make_dev_alias(ofw_consdev.cn_dev, "ofwcons");
+ make_dev_alias(dev, "ofwcons");
}
}
@@ -275,7 +276,6 @@ ofw_cons_probe(struct consdev *cp)
return;
}
- cp->cn_dev = NULL;
cp->cn_pri = CN_INTERNAL;
}
diff --git a/sys/dev/sab/sab.c b/sys/dev/sab/sab.c
index 4d86a5b..2eeb7f0 100644
--- a/sys/dev/sab/sab.c
+++ b/sys/dev/sab/sab.c
@@ -1111,7 +1111,7 @@ sab_cnprobe(struct consdev *cn)
cn->cn_pri = CN_DEAD;
else {
cn->cn_pri = CN_REMOTE;
- cn->cn_dev = sc->sc_si;
+ strcpy(cn->cn_name, devtoname(sc->sc_si));
cn->cn_tp = sc->sc_tty;
}
}
diff --git a/sys/dev/zs/zs.c b/sys/dev/zs/zs.c
index c797b4b..f3687ff 100644
--- a/sys/dev/zs/zs.c
+++ b/sys/dev/zs/zs.c
@@ -869,7 +869,7 @@ zs_cnprobe(struct consdev *cn)
cn->cn_pri = CN_DEAD;
else {
cn->cn_pri = CN_REMOTE;
- cn->cn_dev = sc->sc_si;
+ strcpy(cn->cn_name, devtoname(sc->sc_si));
cn->cn_tp = sc->sc_tty;
}
}
OpenPOWER on IntegriCloud