bus_generic_detach9
Generic implementation of device_detach for buses
Usage
#include <sys/param.h>
#include <sys/bus.h>
int
bus_generic_detach(device_t dev);
Overview
This function provides an implementation of the DEVICE_DETACH(9) method which can be used by most bus code. It uses bus_detach_children(9) to detach drivers from all child devices giving them a chance to veto the detach request. If bus_detach_children() succeeds, bus_generic_detach() calls device_delete_children(9) to delete all child devices.
Return values
Zero is returned on success, otherwise an appropriate error is returned.
Releases
77 releases since FreeBSD 3.0-RELEASE; the text changed 40 times.