]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
syscons: drop keyboard index from softc
authorKyle Evans <kevans@FreeBSD.org>
Mon, 23 Dec 2019 21:32:07 +0000 (21:32 +0000)
committerKyle Evans <kevans@FreeBSD.org>
Mon, 23 Dec 2019 21:32:07 +0000 (21:32 +0000)
commit3322036efb397afefd5fc7adccb016a7116186d1
treea310ed8f338ac06dea7620a8a80855a5cb9c0cda
parentc389a786dd966e2fa7b6fb24561f200f06ada8f3
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/dev/syscons/syscons.c
sys/dev/syscons/syscons.h
sys/isa/syscons_isa.c