diff options
| author | riastradh <riastradh@NetBSD.org> | 2023-05-10 00:11:41 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2023-05-10 00:11:41 +0000 |
| commit | a9d3729382bf20efda2402426f98e12c52c42b14 (patch) | |
| tree | bee63952b3d33e854d209ffe3c68486f4c449f82 /sys/dev | |
| parent | 9023356ed450654fc1a443c8f50a07e690e143f6 (diff) | |
emuxki(4): Use config_detach_children.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/emuxki.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/pci/emuxki.c b/sys/dev/pci/emuxki.c index 498e32fb8a7..003d2a6cfe2 100644 --- a/sys/dev/pci/emuxki.c +++ b/sys/dev/pci/emuxki.c @@ -1,4 +1,4 @@ -/* $NetBSD: emuxki.c,v 1.76 2022/09/07 03:34:43 khorben Exp $ */ +/* $NetBSD: emuxki.c,v 1.77 2023/05/10 00:11:41 riastradh Exp $ */ /*- * Copyright (c) 2001, 2007 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.76 2022/09/07 03:34:43 khorben Exp $"); +__KERNEL_RCSID(0, "$NetBSD: emuxki.c,v 1.77 2023/05/10 00:11:41 riastradh Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -483,11 +483,12 @@ unmap: static int emuxki_detach(device_t self, int flags) { - struct emuxki_softc *sc; + struct emuxki_softc *sc = device_private(self); + int error; - sc = device_private(self); - if (sc->sc_audev != NULL) /* Test in case audio didn't attach */ - config_detach(sc->sc_audev, 0); + error = config_detach_children(self, flags); + if (error) + return error; /* All voices should be stopped now but add some code here if not */ emuxki_writeio_4(sc, EMU_HCFG, |
