Date: Mon, 11 Sep 2006 19:41:31 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern bus_if.m subr_bus.c Message-ID: <200609111941.k8BJfV8U089067@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jhb 2006-09-11 19:41:31 UTC
FreeBSD src repository
Modified files:
sys/kern bus_if.m subr_bus.c
Log:
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
Revision Changes Path
1.32 +1 -1 src/sys/kern/bus_if.m
1.197 +7 -0 src/sys/kern/subr_bus.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200609111941.k8BJfV8U089067>
