diff options
Diffstat (limited to 'sys/dev/fdt/simplebus.c')
-rw-r--r-- | sys/dev/fdt/simplebus.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/fdt/simplebus.c b/sys/dev/fdt/simplebus.c index 37db238f2108..a301fb0f247c 100644 --- a/sys/dev/fdt/simplebus.c +++ b/sys/dev/fdt/simplebus.c @@ -182,19 +182,25 @@ simplebus_attach(device_t dev) if (rv != 0) return (rv); - return (bus_generic_attach(dev)); + bus_attach_children(dev); + return (0); } int simplebus_detach(device_t dev) { struct simplebus_softc *sc; + int rv; + + rv = bus_generic_detach(dev); + if (rv != 0) + return (rv); sc = device_get_softc(dev); if (sc->ranges != NULL) free(sc->ranges, M_DEVBUF); - return (bus_generic_detach(dev)); + return (0); } void @@ -455,9 +461,6 @@ simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, count = rle->count; } - if (type == SYS_RES_IOPORT) - type = SYS_RES_MEMORY; - if (type == SYS_RES_MEMORY) { /* Remap through ranges property */ for (j = 0; j < sc->nranges; j++) { |