diff options
Diffstat (limited to 'sys/dev/mdio/mdio.c')
-rw-r--r-- | sys/dev/mdio/mdio.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/dev/mdio/mdio.c b/sys/dev/mdio/mdio.c index 55122edd16cc..0ef7e7453799 100644 --- a/sys/dev/mdio/mdio.c +++ b/sys/dev/mdio/mdio.c @@ -37,8 +37,8 @@ static void mdio_identify(driver_t *driver, device_t parent) { - if (device_find_child(parent, mdio_driver.name, -1) == NULL) - BUS_ADD_CHILD(parent, 0, mdio_driver.name, -1); + if (device_find_child(parent, mdio_driver.name, DEVICE_UNIT_ANY) == NULL) + BUS_ADD_CHILD(parent, 0, mdio_driver.name, DEVICE_UNIT_ANY); } static int @@ -54,16 +54,9 @@ static int mdio_attach(device_t dev) { - bus_generic_probe(dev); + bus_identify_children(dev); bus_enumerate_hinted_children(dev); - return (bus_generic_attach(dev)); -} - -static int -mdio_detach(device_t dev) -{ - - bus_generic_detach(dev); + bus_attach_children(dev); return (0); } @@ -108,7 +101,7 @@ static device_method_t mdio_methods[] = { DEVMETHOD(device_identify, mdio_identify), DEVMETHOD(device_probe, mdio_probe), DEVMETHOD(device_attach, mdio_attach), - DEVMETHOD(device_detach, mdio_detach), + DEVMETHOD(device_detach, bus_generic_detach), DEVMETHOD(device_shutdown, bus_generic_shutdown), /* bus interface */ |