Module Name:    src
Committed By:   riastradh
Date:           Wed May 10 00:11:08 UTC 2023

Modified Files:
        src/sys/dev/ic: w83l518d_sdmmc.c

Log Message:
wb(4): Use config_detach_children.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/ic/w83l518d_sdmmc.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/ic/w83l518d_sdmmc.c
diff -u src/sys/dev/ic/w83l518d_sdmmc.c:1.6 src/sys/dev/ic/w83l518d_sdmmc.c:1.7
--- src/sys/dev/ic/w83l518d_sdmmc.c:1.6	Sat Aug  7 16:19:12 2021
+++ src/sys/dev/ic/w83l518d_sdmmc.c	Wed May 10 00:11:08 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: w83l518d_sdmmc.c,v 1.6 2021/08/07 16:19:12 thorpej Exp $ */
+/* $NetBSD: w83l518d_sdmmc.c,v 1.7 2023/05/10 00:11:08 riastradh Exp $ */
 
 /*
  * Copyright (c) 2009 Jared D. McNeill <jmcne...@invisible.ca>
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: w83l518d_sdmmc.c,v 1.6 2021/08/07 16:19:12 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: w83l518d_sdmmc.c,v 1.7 2023/05/10 00:11:08 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -191,13 +191,11 @@ wb_sdmmc_attach(struct wb_softc *wb)
 int
 wb_sdmmc_detach(struct wb_softc *wb, int flags)
 {
-	int rv;
+	int error;
 
-	if (wb->wb_sdmmc_dev) {
-		rv = config_detach(wb->wb_sdmmc_dev, flags);
-		if (rv)
-			return rv;
-	}
+	error = config_detach_children(wb->wb_dev, flags);
+	if (error)
+		return error;
 	wb_sdmmc_disable(wb);
 
 	callout_halt(&wb->wb_sdmmc_callout, NULL);

Reply via email to