diff options
| author | Rafal Jaworowski <raj@FreeBSD.org> | 2010-06-13 12:58:31 +0000 |
|---|---|---|
| committer | Rafal Jaworowski <raj@FreeBSD.org> | 2010-06-13 12:58:31 +0000 |
| commit | 10e866760039d8807309999b53b0132f10fd73ea (patch) | |
| tree | b60c8cca2f465e470b8ba86be1b075907e708a53 /sys/dev/fdt | |
| parent | d7af5349ec1f9269e9bcf20c1b03a321f4d58cf2 (diff) | |
Notes
Diffstat (limited to 'sys/dev/fdt')
| -rw-r--r-- | sys/dev/fdt/fdtbus.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/dev/fdt/fdtbus.c b/sys/dev/fdt/fdtbus.c index 0cf439c20b15..610f2132013f 100644 --- a/sys/dev/fdt/fdtbus.c +++ b/sys/dev/fdt/fdtbus.c @@ -77,6 +77,7 @@ struct fdtbus_softc { /* * Prototypes. */ +static void fdtbus_identify(driver_t *, device_t); static int fdtbus_probe(device_t); static int fdtbus_attach(device_t); @@ -109,6 +110,7 @@ static void newbus_device_from_fdt_node(device_t, phandle_t); */ static device_method_t fdtbus_methods[] = { /* Device interface */ + DEVMETHOD(device_identify, fdtbus_identify), DEVMETHOD(device_probe, fdtbus_probe), DEVMETHOD(device_attach, fdtbus_attach), DEVMETHOD(device_detach, bus_generic_detach), @@ -144,6 +146,14 @@ devclass_t fdtbus_devclass; DRIVER_MODULE(fdtbus, nexus, fdtbus_driver, fdtbus_devclass, 0, 0); +static void +fdtbus_identify(driver_t *driver, device_t parent) +{ + + if (device_find_child(parent, "fdtbus", -1) == NULL) + BUS_ADD_CHILD(parent, 0, "fdtbus", -1); +} + static int fdtbus_probe(device_t dev) { |
