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/siba | |
| parent | 76a869385c0c898a5815f16e4cc99ffc77d1f637 (diff) | |
Notes
Diffstat (limited to 'sys/dev/siba')
| -rw-r--r-- | sys/dev/siba/siba_core.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sys/dev/siba/siba_core.c b/sys/dev/siba/siba_core.c index 2b1a84f6eca0..61652adcaad5 100644 --- a/sys/dev/siba/siba_core.c +++ b/sys/dev/siba/siba_core.c @@ -214,16 +214,8 @@ siba_core_attach(struct siba_softc *siba) int siba_core_detach(struct siba_softc *siba) { - device_t *devlistp; - int devcnt, error = 0, i; - - error = device_get_children(siba->siba_dev, &devlistp, &devcnt); - if (error != 0) - return (0); - - for ( i = 0 ; i < devcnt ; i++) - device_delete_child(siba->siba_dev, devlistp[i]); - free(devlistp, M_TEMP); + /* detach & delete all children */ + device_delete_all_children(siba->siba_dev); return (0); } |
