Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic aic(4): Use config_detach_children.



details:   https://anonhg.NetBSD.org/src/rev/de48119cb45c
branches:  trunk
changeset: 374695:de48119cb45c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed May 10 00:10:35 2023 +0000

description:
aic(4): Use config_detach_children.

diffstat:

 sys/dev/ic/aic6360.c |  14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diffs (37 lines):

diff -r c30374b54368 -r de48119cb45c sys/dev/ic/aic6360.c
--- a/sys/dev/ic/aic6360.c      Wed May 10 00:10:02 2023 +0000
+++ b/sys/dev/ic/aic6360.c      Wed May 10 00:10:35 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aic6360.c,v 1.106 2023/04/05 21:46:09 andvar Exp $     */
+/*     $NetBSD: aic6360.c,v 1.107 2023/05/10 00:10:35 riastradh Exp $  */
 
 /*
  * Copyright (c) 1994, 1995, 1996 Charles M. Hannum.  All rights reserved.
@@ -58,7 +58,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: aic6360.c,v 1.106 2023/04/05 21:46:09 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: aic6360.c,v 1.107 2023/05/10 00:10:35 riastradh Exp $");
 
 #include "opt_ddb.h"
 
@@ -301,13 +301,13 @@ aicattach(struct aic_softc *sc)
 int
 aic_detach(device_t self, int flags)
 {
-       struct aic_softc *sc = device_private(self);
-       int rv = 0;
+       int error;
 
-       if (sc->sc_child != NULL)
-               rv = config_detach(sc->sc_child, flags);
+       error = config_detach_children(self, flags);
+       if (error)
+               return error;
 
-       return (rv);
+       return 0;
 }
 
 /* Initialize AIC6360 chip itself



Home | Main Index | Thread Index | Old Index