Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci auich(4): Use config_detach_children.



details:   https://anonhg.NetBSD.org/src/rev/8381277b048e
branches:  trunk
changeset: 374699:8381277b048e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed May 10 00:11:24 2023 +0000

description:
auich(4): Use config_detach_children.

diffstat:

 sys/dev/pci/auich.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r cd88d4300005 -r 8381277b048e sys/dev/pci/auich.c
--- a/sys/dev/pci/auich.c       Wed May 10 00:11:16 2023 +0000
+++ b/sys/dev/pci/auich.c       Wed May 10 00:11:24 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auich.c,v 1.160 2021/02/06 09:45:17 isaki Exp $        */
+/*     $NetBSD: auich.c,v 1.161 2023/05/10 00:11:24 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2000, 2004, 2005, 2008 The NetBSD Foundation, Inc.
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.160 2021/02/06 09:45:17 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.161 2023/05/10 00:11:24 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -702,10 +702,12 @@ static int
 auich_detach(device_t self, int flags)
 {
        struct auich_softc *sc = device_private(self);
+       int error;
 
        /* audio */
-       if (sc->sc_audiodev != NULL)
-               config_detach(sc->sc_audiodev, flags);
+       error = config_detach_children(self, flags);
+       if (error)
+               return error;
 
        /* sysctl */
        sysctl_teardown(&sc->sc_log);



Home | Main Index | Thread Index | Old Index