diff options
Diffstat (limited to 'sys/dev/ow/owc_gpiobus.c')
-rw-r--r-- | sys/dev/ow/owc_gpiobus.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/ow/owc_gpiobus.c b/sys/dev/ow/owc_gpiobus.c index f919c431c12a..f010a4dc75f1 100644 --- a/sys/dev/ow/owc_gpiobus.c +++ b/sys/dev/ow/owc_gpiobus.c @@ -133,8 +133,9 @@ owc_gpiobus_attach(device_t dev) * interrupts work, because we can't do IO for them until we can read * the system timecounter (which initializes after device attachments). */ - device_add_child(sc->sc_dev, "ow", -1); - return (bus_delayed_attach_children(dev)); + device_add_child(sc->sc_dev, "ow", DEVICE_UNIT_ANY); + bus_delayed_attach_children(dev); + return (0); } static int @@ -145,7 +146,7 @@ owc_gpiobus_detach(device_t dev) sc = device_get_softc(dev); - if ((err = device_delete_children(dev)) != 0) + if ((err = bus_generic_detach(dev)) != 0) return (err); gpio_pin_release(sc->sc_pin); |