Module Name: src
Committed By: riastradh
Date: Wed May 10 00:09:39 UTC 2023
Modified Files:
src/sys/dev/gpio: gpiosim.c
Log Message:
gpiosim(4): Use config_detach_children.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/gpio/gpiosim.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/gpio/gpiosim.c
diff -u src/sys/dev/gpio/gpiosim.c:1.23 src/sys/dev/gpio/gpiosim.c:1.24
--- src/sys/dev/gpio/gpiosim.c:1.23 Sat Aug 7 16:19:10 2021
+++ src/sys/dev/gpio/gpiosim.c Wed May 10 00:09:39 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: gpiosim.c,v 1.23 2021/08/07 16:19:10 thorpej Exp $ */
+/* $NetBSD: gpiosim.c,v 1.24 2023/05/10 00:09:39 riastradh Exp $ */
/* $OpenBSD: gpiosim.c,v 1.1 2008/11/23 18:46:49 mbalmer Exp $ */
/*
@@ -149,10 +149,12 @@ static int
gpiosim_detach(device_t self, int flags)
{
struct gpiosim_softc *sc = device_private(self);
+ int error;
/* Detach the gpio driver that attached here */
- if (sc->sc_gdev != NULL)
- config_detach(sc->sc_gdev, 0);
+ error = config_detach_children(self, flags);
+ if (error)
+ return error;
pmf_device_deregister(self);
if (sc->sc_log != NULL) {