struct mtx * uart_tty_getlock(struct uart_softc *sc) { if (sc->sc_u.u_tty.tp != NULL) return (tty_getlock(sc->sc_u.u_tty.tp)); else return (NULL); }
static void cn_drvinit(void *unused) { struct tty *tp; if (bvm_consdev.cn_pri != CN_DEAD) { tp = tty_alloc(&bvm_ttydevsw, NULL); callout_init_mtx(&bvm_timer, tty_getlock(tp), 0); tty_makedev(tp, NULL, "bvmcons"); } }