---
name: "device_probe_and_attach"
section: "9"
platform: "linux"
package: "freebsd-manpages"
version: "6.0-5"
release: "Debian 4.0 (Etch)"
platforms: ["linux", "freebsd"]
url: "https://new.carta.tech/device_probe_and_attach"
---

# device\_probe\_and\_attach(9)

initialise a device

## NAME

**device\_probe\_and\_attach** – initialise a device

## SYNOPSIS

**#include \<sys/param.h\>**

**#include \<sys/bus.h\>**

*int*\

**device\_probe\_and\_attach**(*device\_t dev*);

## DESCRIPTION

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

## RETURN VALUES

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

## SEE ALSO

[device(9)](/device/9.md), [driver(9)](/driver/9.md)

## AUTHORS

This manual page was written by Doug Rabson.
