diff options
author | imp <imp@FreeBSD.org> | 2015-10-28 19:11:06 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2015-10-28 19:11:06 +0000 |
commit | 35a45e42cd28171e10e6652d8122d00bfcd77bef (patch) | |
tree | 5cb188aa45744edb78afbf4b9eb4ad25215e6c2d /share/man/man9/device_add_child.9 | |
parent | cd70a0a54ffbe92a06d8c25b2d7bd066f8e8365e (diff) | |
download | FreeBSD-src-35a45e42cd28171e10e6652d8122d00bfcd77bef.zip FreeBSD-src-35a45e42cd28171e10e6652d8122d00bfcd77bef.tar.gz |
BUS_ADD_CHILD calls device_add_child. device_add_child does not call
BUS_ADD_CHILD. Make it explicit since it follows the command paradigm
rather than the callback paradigm. Add other clarifying notes as well.
Diffstat (limited to 'share/man/man9/device_add_child.9')
-rw-r--r-- | share/man/man9/device_add_child.9 | 16 |
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 7ddd19a..052db92 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 |