diff options
Diffstat (limited to 'sys/dev/siis/siis.c')
-rw-r--r-- | sys/dev/siis/siis.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/dev/siis/siis.c b/sys/dev/siis/siis.c index 97b2489..40c17cb 100644 --- a/sys/dev/siis/siis.c +++ b/sys/dev/siis/siis.c @@ -205,15 +205,10 @@ static int siis_detach(device_t dev) { struct siis_controller *ctlr = device_get_softc(dev); - device_t *children; - int nchildren, i; /* Detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_all_children(dev); + /* Free interrupts. */ if (ctlr->irq.r_irq) { bus_teardown_intr(dev, ctlr->irq.r_irq, |