device_probe_and_attach(9)

device_probe_and_attach9

Initialise a device

Usage

#include <sys/param.h>

#include <sys/bus.h>

int

device_probe_and_attach(device_t dev);

Overview

This function is called during autoconfiguration to initialise the devices in the system. For each device, the DEVICE_PROBE(9) method of each suitable driver is called and if a probe succeeds, a description of the device is printed and the DEVICE_ATTACH(9) method is called. If the device is disabled using device_disable(9) then it will not be probed.

Return values

Zero is returned on success, otherwise an appropriate error is returned.

Authors

This manual page was written by Doug Rabson.

From freebsd-manpages 6.0-5 in Debian 4.0 (Etch). Parsed by carta from the page's mdoc source.