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

# BUS\_ADD\_CHILD(9)

add a device node to the tree with a given priority

## NAME

**BUS\_ADD\_CHILD** – add a device node to the tree with a given priority

## SYNOPSIS

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

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

*int*\

**BUS\_ADD\_CHILD**(*device\_t dev*, *int order*, *const char \*name*, *int unit*);

## DESCRIPTION

The **BUS\_ADD\_CHILD**() method is used by the driver identify routine to add devices to the tree. Please see [device\_add\_child(9)](/device_add_child/9.md) for more details. The interface is the same as [device\_add\_child(9)](/device_add_child/9.md) however, the bus' **BUS\_ADD\_CHILD**() is called.

Busses implementing **BUS\_ADD\_CHILD**() should insert the device into the tree using [device\_add\_child(9)](/device_add_child/9.md) before adding things such as their own ivars and resource lists to the device.

## RETURN VALUES

The **BUS\_ADD\_CHILD**() method returns *device\_t* added to the tree, or NULL.

## SEE ALSO

[device(9)](/device/9.md), [device\_add\_child(9)](/device_add_child/9.md), [driver(9)](/driver/9.md)

## AUTHORS

This manual page was written by M. Warner Losh.
