Deleted Added
full compact
26c26
< * $Id: atkbdc_isa.c,v 1.4 1999/05/08 21:59:29 dfr Exp $
---
> * $Id: atkbdc_isa.c,v 1.5 1999/05/09 20:45:53 peter Exp $
67a68,69
> DEVMETHOD(device_suspend, bus_generic_suspend),
> DEVMETHOD(device_resume, bus_generic_resume),
91,92d92
< atkbdc_softc_t *sc;
< int unit;
95,109d94
< unit = device_get_unit(dev);
< sc = *(atkbdc_softc_t **)device_get_softc(dev);
< if (sc == NULL) {
< /*
< * We have to maintain two copies of the kbdc_softc struct,
< * as the low-level console needs to have access to the
< * keyboard controller before kbdc is probed and attached.
< * kbdc_soft[] contains the default entry for that purpose.
< * See atkbdc.c. XXX
< */
< sc = atkbdc_get_softc(unit);
< if (sc == NULL)
< return ENOMEM;
< }
<
111,112c96
<
< error = atkbdc_probe_unit(sc, unit, isa_get_port(dev));
---
> error = atkbdc_probe_unit(device_get_unit(dev), isa_get_port(dev));
114,115c98
< *(atkbdc_softc_t **)device_get_softc(dev) = sc;
<
---
> isa_set_portsize(dev, IO_KBDSIZE);
150a134,135
> int unit;
> int error;
152a138
> unit = device_get_unit(dev);
154,155c140,151
< if ((sc == NULL) || (sc->port <= 0))
< return ENXIO;
---
> if (sc == NULL) {
> /*
> * We have to maintain two copies of the kbdc_softc struct,
> * as the low-level console needs to have access to the
> * keyboard controller before kbdc is probed and attached.
> * kbdc_soft[] contains the default entry for that purpose.
> * See atkbdc.c. XXX
> */
> sc = atkbdc_get_softc(unit);
> if (sc == NULL)
> return ENOMEM;
> }
156a153,157
> error = atkbdc_attach_unit(unit, sc, isa_get_port(dev));
> if (error)
> return error;
> *(atkbdc_softc_t **)device_get_softc(dev) = sc;
>