From 3322036efb397afefd5fc7adccb016a7116186d1 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Mon, 23 Dec 2019 21:32:07 +0000 Subject: syscons: drop keyboard index from softc Analysis seems to reveal that sc->keyboard >= 0 implies sc->kbd != NULL and there's no such scenario where sc->kbd is set (and theoretically used to rebuild sc->keyboard) with the keyboard unavailable. Drop the index softc. The index is only explicitly needed in few places, in which case we can just as easily grab it from sc->kbd. There's no need for keeping sc->kbd and sc->keyboard in sync when it can be readily accomplished with just the former. --- sys/isa/syscons_isa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/isa') diff --git a/sys/isa/syscons_isa.c b/sys/isa/syscons_isa.c index 50a673a86b9c..898529d455b8 100644 --- a/sys/isa/syscons_isa.c +++ b/sys/isa/syscons_isa.c @@ -117,7 +117,7 @@ sc_softc_t } sc->unit = unit; if ((sc->flags & SC_INIT_DONE) == 0) { - sc->keyboard = -1; + sc->kbd = NULL; sc->adapter = -1; sc->cursor_char = SC_CURSOR_CHAR; sc->mouse_char = SC_MOUSE_CHAR; -- cgit v1.2.3