BUS_ADD_CHILD(9)

BUS_ADD_CHILD9

Add a device node to the tree with a given priority

Usage

#include <sys/param.h>

#include <sys/bus.h>

int

BUS_ADD_CHILD(device_t dev, int order, const char *name, int unit);

Overview

The BUS_ADD_CHILD() method is used by the driver identify routine to add devices to the tree. Please see device_add_child(9) for more details. The interface is the same as device_add_child(9) 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) 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.

Authors

This manual page was written by M. Warner Losh.

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