Cache dev_t values in the right structure.

Tested by:	Jay Cornwall <jay@evilrealms.net>
This commit is contained in:
ticso 2003-10-12 15:51:40 +00:00
parent 087c5fbdfa
commit 25f9f8ac49

View File

@ -272,9 +272,9 @@ ugen_make_devnodes(struct ugen_softc *sc)
"%s.%d",
USBDEVNAME(sc->sc_dev), endptno);
if (sc->sc_endpoints[endptno][IN].sc != NULL)
sc->sc_endpoints[endptno][IN].sc->dev = dev;
sc->sc_endpoints[endptno][IN].dev = dev;
if (sc->sc_endpoints[endptno][OUT].sc != NULL)
sc->sc_endpoints[endptno][OUT].sc->dev = dev;
sc->sc_endpoints[endptno][OUT].dev = dev;
}
}
}
@ -298,9 +298,9 @@ ugen_destroy_devnodes(struct ugen_softc *sc)
* of the structs is populated.
*/
if (sc->sc_endpoints[endptno][IN].sc != NULL)
dev = sc->sc_endpoints[endptno][IN].sc->dev;
dev = sc->sc_endpoints[endptno][IN].dev;
else
dev = sc->sc_endpoints[endptno][OUT].sc->dev;
dev = sc->sc_endpoints[endptno][OUT].dev;
destroy_dev(dev);
}
}