FreeBSD/sys/kern/subr_bus.c
/**
 * @brief Tells a driver to quiesce itself.
 *
 * This function is a wrapper around the DEVICE_QUIESCE() driver
 * method. If the call to DEVICE_QUIESCE() succeeds.
 *
 * @param dev		the device to quiesce
 *
 * @retval 0		success
 * @retval ENXIO	no driver was found
 * @retval ENOMEM	memory allocation failure
 * @retval non-zero	some other unix error code
 */
@brief Tells a driver to quiesce itself.
This function is a wrapper around the DEVICE_QUIESCE() driver
method. If the call to DEVICE_QUIESCE() succeeds.

@param dev           the device to quiesce

@retval 0            success
@retval ENXIO        no driver was found
@retval ENOMEM       memory allocation failure
@retval non-zero     some other unix error code
@brief Tells a driver to quiesce itself . This function is a wrapper around the DEVICE_QUIESCE () driver method . If the call to DEVICE_QUIESCE () succeeds . @param dev the device to quiesce @retval 0 success @retval ENXIO no driver was found @retval ENOMEM memory allocation failure @retval non - zero some other unix error code
int
device_quiesce(device_t dev)
{
	PDEBUG(("%s", DEVICENAME(dev)));
	if (dev->state == DS_BUSY)
		return (EBUSY);
	if (dev->state != DS_ATTACHED)
		return (0);
	return (DEVICE_QUIESCE(dev));
}
int device_quiesce ( device_t dev ) { PDEBUG ( ( " " , DEVICENAME ( dev ) ) ) ; if ( dev -> state == DS_BUSY ) return ( EBUSY ) ; if ( dev -> state != DS_ATTACHED ) return ( 0 ) ; return ( DEVICE_QUIESCE ( dev ) ) ; }
@brief Tells a driver to quiesce itself.
@brief Tells a driver to quiesce itself .