Module Name: src
Committed By: riastradh
Date: Wed May 10 00:11:41 UTC 2023
Modified Files:
src/sys/dev/pci: emuxki.c
Log Message:
emuxki(4): Use config_detach_children.
To generate a diff of this commit:
cvs rdiff -u -r1.76 -r1.77 src/sys/dev/pci/emuxki.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pci/emuxki.c
diff -u src/sys/dev/pci/emuxki.c:1.76 src/sys/dev/pci/emuxki.c:1.77
--- src/sys/dev/pci/emuxki.c:1.76 Wed Sep 7 03:34:43 2022
+++ src/sys/dev/pci/emuxki.c Wed May 10 00:11:41 2023
@@ -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,