MCPcopy Create free account
hub / github.com/F-Stack/f-stack / devclass_get_softc

Function devclass_get_softc

freebsd/kern/subr_bus.c:1413–1423  ·  view source on GitHub ↗

* @brief Find the softc field of a device given a unit number * * @param dc the devclass to search * @param unit the unit number to search for * * @returns the softc field of the device with the given * unit number or @c NULL if there is no such * device */

Source from the content-addressed store, hash-verified

1411 * device
1412 */
1413void *
1414devclass_get_softc(devclass_t dc, int unit)
1415{
1416 device_t dev;
1417
1418 dev = devclass_get_device(dc, unit);
1419 if (!dev)
1420 return (NULL);
1421
1422 return (device_get_softc(dev));
1423}
1424
1425/**
1426 * @brief Get a list of devices in the devclass

Callers 3

ccp.cFile · 0.85
smapi_ioctlFunction · 0.85
apmopenFunction · 0.85

Calls 2

devclass_get_deviceFunction · 0.85
device_get_softcFunction · 0.85

Tested by

no test coverage detected