summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2006-09-11 22:20:37 +0000
committerjhb <jhb@FreeBSD.org>2006-09-11 22:20:37 +0000
commitc74e70f7a8f39a60078eafdfacb3a154e190b0f8 (patch)
tree2f62647bd32c1d1e3a0772668981023f204c76cb /sys
parente2689a926c8bedb36b365e21feeb9230e5c19e9e (diff)
downloadFreeBSD-src-c74e70f7a8f39a60078eafdfacb3a154e190b0f8.zip
FreeBSD-src-c74e70f7a8f39a60078eafdfacb3a154e190b0f8.tar.gz
- Revert making bus_generic_add_child() the default for BUS_ADD_CHILD().
Instead, we want busses to explicitly specify an add_child routine if they want to support identify routines, but by default disallow having outside drivers add devices. - Give smbus(4) an explicit bus_add_child() method. Requested by: imp
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/smbus/smbus.c1
-rw-r--r--sys/kern/bus_if.m2
2 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/smbus/smbus.c b/sys/dev/smbus/smbus.c
index ce7bdc6..41cc49a 100644
--- a/sys/dev/smbus/smbus.c
+++ b/sys/dev/smbus/smbus.c
@@ -56,6 +56,7 @@ static device_method_t smbus_methods[] = {
DEVMETHOD(device_detach, smbus_detach),
/* bus interface */
+ DEVMETHOD(bus_add_child, bus_generic_add_child),
DEVMETHOD(bus_print_child, bus_generic_print_child),
{ 0, 0 }
diff --git a/sys/kern/bus_if.m b/sys/kern/bus_if.m
index bd848f2..529b506 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
OpenPOWER on IntegriCloud