Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/gpio gpiosim(4): Use config_detach_children.
details: https://anonhg.NetBSD.org/src/rev/27aae545d1f7
branches: trunk
changeset: 374691:27aae545d1f7
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed May 10 00:09:39 2023 +0000
description:
gpiosim(4): Use config_detach_children.
diffstat:
sys/dev/gpio/gpiosim.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (24 lines):
diff -r 6e5280afb9d6 -r 27aae545d1f7 sys/dev/gpio/gpiosim.c
--- a/sys/dev/gpio/gpiosim.c Wed May 10 00:09:31 2023 +0000
+++ b/sys/dev/gpio/gpiosim.c Wed May 10 00:09:39 2023 +0000
@@ -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) {
Home |
Main Index |
Thread Index |
Old Index