diff options
| author | riastradh <riastradh@NetBSD.org> | 2023-05-10 21:30:50 +0000 |
|---|---|---|
| committer | riastradh <riastradh@NetBSD.org> | 2023-05-10 21:30:50 +0000 |
| commit | 4ed2533e5753b72003b7fb874bb89a0721103c10 (patch) | |
| tree | 9f3579cd37d52c485ba1a2009ccd15c626713c37 /sys/dev | |
| parent | ab6ecad6405d5d33e42c44385b3e33d1eb9eb680 (diff) | |
opl(4): Use config_detach_children.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/opl.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/ic/opl.c b/sys/dev/ic/opl.c index 8090d3ee357..c5a81091620 100644 --- a/sys/dev/ic/opl.c +++ b/sys/dev/ic/opl.c @@ -1,4 +1,4 @@ -/* $NetBSD: opl.c,v 1.43 2019/05/08 13:40:18 isaki Exp $ */ +/* $NetBSD: opl.c,v 1.44 2023/05/10 21:30:50 riastradh Exp $ */ /* * Copyright (c) 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.43 2019/05/08 13:40:18 isaki Exp $"); +__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.44 2023/05/10 21:30:50 riastradh Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -192,12 +192,13 @@ opl_attach(struct opl_softc *sc) int opl_detach(struct opl_softc *sc, int flags) { - int rv = 0; + int error; - if (sc->sc_mididev != NULL) - rv = config_detach(sc->sc_mididev, flags); + error = config_detach_children(sc->dev, flags); + if (error) + return error; - return(rv); + return 0; } static void |
