diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2020-03-09 04:38:47 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2020-03-09 04:38:47 +0000 |
commit | e4c1dc8ea01e6cc3f9960e5a241d530137b7fcdd (patch) | |
tree | 503f16d273300f89364c1fe10ef32b6f636bc93f /sys/dev/ic | |
parent | cc96b46e94c93201fe60254073af0b02fd569167 (diff) |
Update the console device always when attaching the real device
driver. The information by the driver is supposed more reliable than
the information which was set up earlier.
ok patrick
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/com.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index 0f2e6e4509b..0659a9d0600 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com.c,v 1.171 2020/02/05 10:21:17 mpi Exp $ */ +/* $OpenBSD: com.c,v 1.172 2020/03/09 04:38:46 yasuoka Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /* @@ -1498,8 +1498,8 @@ com_attach_subr(struct com_softc *sc) if (cdevsw[maj].d_open == comopen) break; - if (maj < nchrdev && cn_tab->cn_dev == NODEV) - cn_tab->cn_dev = makedev(maj, sc->sc_dev.dv_unit); + KASSERT(maj < nchrdev); + cn_tab->cn_dev = makedev(maj, sc->sc_dev.dv_unit); printf("%s: console\n", sc->sc_dev.dv_xname); } |