Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic opl(4): Use config_detach_children.
details: https://anonhg.NetBSD.org/src/rev/c3e4fc7639ab
branches: trunk
changeset: 374724:c3e4fc7639ab
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed May 10 21:30:50 2023 +0000
description:
opl(4): Use config_detach_children.
diffstat:
sys/dev/ic/opl.c | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
diffs (36 lines):
diff -r a25ad3ca0c84 -r c3e4fc7639ab sys/dev/ic/opl.c
--- a/sys/dev/ic/opl.c Wed May 10 18:22:33 2023 +0000
+++ b/sys/dev/ic/opl.c Wed May 10 21:30:50 2023 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index