Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb irmce(4): Use config_detach_children.



details:   https://anonhg.NetBSD.org/src/rev/6df9e2cfe7d8
branches:  trunk
changeset: 374707:6df9e2cfe7d8
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed May 10 00:12:28 2023 +0000

description:
irmce(4): Use config_detach_children.

diffstat:

 sys/dev/usb/irmce.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (33 lines):

diff -r b5ebee88c0d7 -r 6df9e2cfe7d8 sys/dev/usb/irmce.c
--- a/sys/dev/usb/irmce.c       Wed May 10 00:12:20 2023 +0000
+++ b/sys/dev/usb/irmce.c       Wed May 10 00:12:28 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: irmce.c,v 1.8 2021/08/07 16:19:16 thorpej Exp $ */
+/* $NetBSD: irmce.c,v 1.9 2023/05/10 00:12:28 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2011 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: irmce.c,v 1.8 2021/08/07 16:19:16 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: irmce.c,v 1.9 2023/05/10 00:12:28 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -255,11 +255,9 @@ irmce_detach(device_t self, int flags)
        struct irmce_softc *sc = device_private(self);
        int error;
 
-       if (sc->sc_cirdev) {
-               error = config_detach(sc->sc_cirdev, flags);
-               if (error)
-                       return error;
-       }
+       error = config_detach_children(self, flags);
+       if (error)
+               return error;
 
        if (sc->sc_bulkin_pipe) {
                usbd_abort_pipe(sc->sc_bulkin_pipe);



Home | Main Index | Thread Index | Old Index