* @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 */
| 1411 | * device |
| 1412 | */ |
| 1413 | void * |
| 1414 | devclass_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 |
no test coverage detected