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

Function devclass_get_device

freebsd/kern/subr_bus.c:1395–1401  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

1393 * NULL if there is no such device
1394 */
1395device_t
1396devclass_get_device(devclass_t dc, int unit)
1397{
1398 if (dc == NULL || unit < 0 || unit >= dc->maxunit)
1399 return (NULL);
1400 return (dc->devices[unit]);
1401}
1402
1403/**
1404 * @brief Find the softc field of a device given a unit number

Callers 15

bcm_mbox_writeFunction · 0.85
piix_probeFunction · 0.85
pnpbios_identifyFunction · 0.85
jz4780_ohci_enableFunction · 0.85
jz4780_ehci_enableFunction · 0.85
jz4780_otg_enableFunction · 0.85
ci20_hp_unmuteFunction · 0.85
platform_init_secondaryFunction · 0.85
nlm_xlpnae_update_pdeFunction · 0.85
fpgamgr_s10_attachFunction · 0.85
am335x_pwm_config_ecapFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected