diff --git a/sys/isa/syscons_isa.c b/sys/isa/syscons_isa.c --- a/sys/isa/syscons_isa.c +++ b/sys/isa/syscons_isa.c @@ -97,7 +97,7 @@ sc_max_unit(void) { - return (devclass_get_maxunit(sc_devclass)); + return (devclass_get_maxunit(devclass_find("sc"))); } sc_softc_t @@ -111,7 +111,8 @@ /* FIXME: clear if it is wired to another unit! */ sc = &main_softc; } else { - sc = device_get_softc(devclass_get_device(sc_devclass, unit)); + sc = device_get_softc(devclass_get_device(devclass_find("sc"), + unit)); if (sc == NULL) return (NULL); } @@ -127,6 +128,7 @@ sc_softc_t *sc_find_softc(struct video_adapter *adp, struct keyboard *kbd) { + devclass_t dc; sc_softc_t *sc; int i; int units; @@ -135,9 +137,10 @@ if ((adp == NULL || adp == sc->adp) && (kbd == NULL || kbd == sc->kbd)) return (sc); - units = devclass_get_maxunit(sc_devclass); + dc = devclass_find("sc"); + units = devclass_get_maxunit(dc); for (i = 0; i < units; ++i) { - sc = device_get_softc(devclass_get_device(sc_devclass, i)); + sc = device_get_softc(devclass_get_device(dc, i)); if (sc == NULL) continue; if ((adp == NULL || adp == sc->adp) &&