MCPcopy Create free account
hub / github.com/F-Stack/f-stack / device_probe_and_attach

Function device_probe_and_attach

freebsd/kern/subr_bus.c:2895–2912  ·  view source on GitHub ↗

* @brief Probe a device and attach a driver if possible * * calls device_probe() and attaches if that was successful. */

Source from the content-addressed store, hash-verified

2893 * calls device_probe() and attaches if that was successful.
2894 */
2895int
2896device_probe_and_attach(device_t dev)
2897{
2898 int error;
2899
2900 GIANT_REQUIRED;
2901
2902 error = device_probe(dev);
2903 if (error == -1)
2904 return (0);
2905 else if (error != 0)
2906 return (error);
2907
2908 CURVNET_SET_QUIET(vnet0);
2909 error = device_attach(dev);
2910 CURVNET_RESTORE();
2911 return error;
2912}
2913
2914/**
2915 * @brief Attach a device driver to a device

Callers 15

jz4780_mmc_attachFunction · 0.85
jzlcd_configureFunction · 0.85
jz4780_ehci_attachFunction · 0.85
jz4780_ohci_attachFunction · 0.85
ar71xx_ohci_attachFunction · 0.85
ar71xx_ehci_attachFunction · 0.85
octusb_octeon_attachFunction · 0.85
ohci_fdt_attachFunction · 0.85
ehci_fdt_attachFunction · 0.85
dotg_fdt_attachFunction · 0.85
mtk_xhci_fdt_attachFunction · 0.85
rk_pinctrl_attachFunction · 0.85

Calls 2

device_probeFunction · 0.85
device_attachFunction · 0.70

Tested by

no test coverage detected