diff options
| author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2011-11-19 10:11:50 +0000 |
|---|---|---|
| committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2011-11-19 10:11:50 +0000 |
| commit | 11bcf702f4200a351f06b549e14bc9ea4fc76dcc (patch) | |
| tree | d8ce224aa83a7409b55f7416386eadc3d984598d /sys/dev/ppc | |
| parent | 76a869385c0c898a5815f16e4cc99ffc77d1f637 (diff) | |
Notes
Diffstat (limited to 'sys/dev/ppc')
| -rw-r--r-- | sys/dev/ppc/ppc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/dev/ppc/ppc.c b/sys/dev/ppc/ppc.c index 1322a33a112d..ef505d87d7d6 100644 --- a/sys/dev/ppc/ppc.c +++ b/sys/dev/ppc/ppc.c @@ -1851,20 +1851,13 @@ int ppc_detach(device_t dev) { struct ppc_data *ppc = DEVTOSOFTC(dev); - device_t *children; - int nchildren, i; if (ppc->res_irq == 0) { return (ENXIO); } /* detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - if (children[i]) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } + device_delete_all_children(dev); if (ppc->res_irq != 0) { bus_teardown_intr(dev, ppc->res_irq, ppc->intr_cookie); |
