diff options
Diffstat (limited to 'sys/dev/gpio/ofw_gpiobus.c')
-rw-r--r-- | sys/dev/gpio/ofw_gpiobus.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/gpio/ofw_gpiobus.c b/sys/dev/gpio/ofw_gpiobus.c index 9173bcd1500c..fc5fb03d6824 100644 --- a/sys/dev/gpio/ofw_gpiobus.c +++ b/sys/dev/gpio/ofw_gpiobus.c @@ -36,6 +36,7 @@ #include <sys/module.h> #include <dev/gpio/gpiobusvar.h> +#include <dev/gpio/gpiobus_internal.h> #include <dev/ofw/ofw_bus.h> #include "gpiobus_if.h" @@ -157,7 +158,7 @@ ofw_gpiobus_add_fdt_child(device_t bus, const char *drvname, phandle_t child) /* * Set up the GPIO child and OFW bus layer devinfo and add it to bus. */ - childdev = device_add_child(bus, drvname, -1); + childdev = device_add_child(bus, drvname, DEVICE_UNIT_ANY); if (childdev == NULL) return (NULL); dinfo = ofw_gpiobus_setup_devinfo(bus, childdev, child); @@ -425,7 +426,7 @@ ofw_gpiobus_attach(device_t dev) err = gpiobus_init_softc(dev); if (err != 0) return (err); - bus_generic_probe(dev); + bus_identify_children(dev); bus_enumerate_hinted_children(dev); /* * Attach the children represented in the device tree. @@ -440,7 +441,8 @@ ofw_gpiobus_attach(device_t dev) continue; } - return (bus_generic_attach(dev)); + bus_attach_children(dev); + return (0); } static device_t |