diff options
author | jhb <jhb@FreeBSD.org> | 2006-09-11 19:41:31 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-09-11 19:41:31 +0000 |
commit | 7be67f8a9364ca4407a48ee5c7af19164cc6a058 (patch) | |
tree | 8dede9a77a810fe11c00d0e49e437ddb74494ec2 /sys/kern/bus_if.m | |
parent | 0b24ec1e7cefed500ff17d6182344e8365af41fc (diff) | |
download | FreeBSD-src-7be67f8a9364ca4407a48ee5c7af19164cc6a058.zip FreeBSD-src-7be67f8a9364ca4407a48ee5c7af19164cc6a058.tar.gz |
Add a default method for BUS_ADD_CHILD() that just calls
device_add_child_ordered(). Previously, a device driver that wanted to
add a new child device in its identify routine had to know if the parent
driver had a custom bus_add_child method and use BUS_ADD_CHILD() in that
case, otherwise use device_add_child(). Getting it wrong in either
direction would result in panics or failure to add the child device. Now,
BUS_ADD_CHILD() always works isolating child drivers from having to know
intimate details about the parent driver.
Discussed with: imp
MFC after: 1 week
Diffstat (limited to 'sys/kern/bus_if.m')
-rw-r--r-- | sys/kern/bus_if.m | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m index 529b506..bd848f2 100644 --- a/sys/kern/bus_if.m +++ b/sys/kern/bus_if.m @@ -194,7 +194,7 @@ METHOD device_t add_child { int _order; const char *_name; int _unit; -}; +} DEFAULT bus_generic_add_child; /** * @brief Allocate a system resource |