FreeBSD/sys/kern/subr_bus.c
/**
 * @brief Claim softc
 *
 * This function can be used to let the driver free the automatically
 * allocated softc using "device_free_softc()". This function is
 * useful when the driver is refcounting the softc and the softc
 * cannot be freed when the "device_detach" method is called.
 */
@brief Claim softc
This function can be used to let the driver free the automatically
allocated softc using "device_free_softc()". This function is
useful when the driver is refcounting the softc and the softc
cannot be freed when the "device_detach" method is called.
@brief Claim softc This function can be used to let the driver free the automatically allocated softc using " device_free_softc () " . This function is useful when the driver is refcounting the softc and the softc cannot be freed when the " device_detach " method is called .
void
device_claim_softc(device_t dev)
{
	if (dev->softc)
		dev->flags |= DF_EXTERNALSOFTC;
	else
		dev->flags &= ~DF_EXTERNALSOFTC;
}
void device_claim_softc ( device_t dev ) { if ( dev -> softc ) dev -> flags |= DF_EXTERNALSOFTC ; else dev -> flags &= ~ DF_EXTERNALSOFTC ; }
@brief Claim softc
 This function can be used to let the driver free the automatically
 allocated softc using "device_free_softc()".
@brief Claim softc This function can be used to let the driver free the automatically allocated softc using " device_free_softc () " .