FreeBSD/sys/kern/subr_bus.c
/**
 * @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
 */
@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
@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
void *
devclass_get_softc(devclass_t dc, int unit)
{
	device_t dev;
	dev = devclass_get_device(dc, unit);
	if (!dev)
		return (NULL);
	return (device_get_softc(dev));
}
void * devclass_get_softc ( devclass_t dc , int unit ) { device_t dev ; dev = devclass_get_device ( dc , unit ) ; if ( ! dev ) return ( NULL ) ; return ( device_get_softc ( dev ) ) ; }
@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
@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