aboutsummaryrefslogtreecommitdiff
path: root/share/man/man9/device_add_child.9
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-11-01 21:17:38 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-11-01 21:17:38 +0000
commit3c3feed41a52b5692575275541bce39a83146644 (patch)
treed7eefbc43ae961805537882e088a954e7b9cf530 /share/man/man9/device_add_child.9
parentd8ed03efe5a7e8cc83f204393b6a083915bf9c22 (diff)
parentbb3d23fd35c00a652a92e4249477e5240f3a4180 (diff)
downloadsrc-3c3feed41a52b5692575275541bce39a83146644.tar.gz
src-3c3feed41a52b5692575275541bce39a83146644.zip
Merge from head
Notes
Notes: svn path=/projects/collation/; revision=290241
Diffstat (limited to 'share/man/man9/device_add_child.9')
-rw-r--r--share/man/man9/device_add_child.916
1 files changed, 12 insertions, 4 deletions
diff --git a/share/man/man9/device_add_child.9 b/share/man/man9/device_add_child.9
index 7ddd19a1564b..052db923ef29 100644
--- a/share/man/man9/device_add_child.9
+++ b/share/man/man9/device_add_child.9
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd September 12, 2006
+.Dd October 28, 2015
.Dt DEVICE_ADD_CHILD 9
.Os
.Sh NAME
@@ -74,14 +74,14 @@ Normally unit numbers will be chosen automatically by the system and a
unit number of
.Dv -1
should be given.
-When a specific unit number is desired (e.g.\& for wiring a particular
+When a specific unit number is desired (e.g.,\& for wiring a particular
piece of hardware to a pre-configured unit number), that unit should
be passed.
If the specified unit number is already allocated, a new
unit will be allocated and a diagnostic message printed.
.Pp
If the devices attached to a bus must be probed in a specific order
-(e.g.\& for the ISA bus some devices are sensitive to failed probe attempts
+(e.g.,\& for the ISA bus some devices are sensitive to failed probe attempts
of unrelated drivers and therefore must be probed first),
the
.Fa order
@@ -109,10 +109,18 @@ Authors of bus drivers must likewise be careful when adding children
when they are loaded and unloaded to avoid duplication of children
devices.
.Pp
-Identify routines should use
+When adding a child to another device node, such as in an identify
+routine, use
.Xr BUS_ADD_CHILD 9
instead of
.Xr device_add_child 9 .
+.Xr BUS_ADD_CHILD 9
+will call
+.Xr device_add_child 9
+and add the proper bus-specific data to the new child.
+.Fn device_add_child
+does not call
+.Xr BUS_ADD_CHILD 9 .
.Sh RETURN VALUES
The new device if successful, NULL otherwise.
.Sh SEE ALSO