Module Name:    src
Committed By:   nat
Date:           Tue Jan  9 04:14:21 UTC 2018

Modified Files:
        src/sys/dev: audio.c

Log Message:
Forcefully detach children of audio instances.

This addresses part of PR kern/52889 as children of pad(4) were not
detaching.


To generate a diff of this commit:
cvs rdiff -u -r1.448 -r1.449 src/sys/dev/audio.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/audio.c
diff -u src/sys/dev/audio.c:1.448 src/sys/dev/audio.c:1.449
--- src/sys/dev/audio.c:1.448	Tue Jan  9 04:10:27 2018
+++ src/sys/dev/audio.c	Tue Jan  9 04:14:21 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.448 2018/01/09 04:10:27 nat Exp $	*/
+/*	$NetBSD: audio.c,v 1.449 2018/01/09 04:14:21 nat Exp $	*/
 
 /*-
  * Copyright (c) 2016 Nathanial Sloss <nathanialsl...@yahoo.com.au>
@@ -148,7 +148,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.448 2018/01/09 04:10:27 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.449 2018/01/09 04:14:21 nat Exp $");
 
 #ifdef _KERNEL_OPT
 #include "audio.h"
@@ -894,7 +894,7 @@ audiodetach(device_t self, int flags)
 	DPRINTF(("audio_detach: sc=%p flags=%d\n", sc, flags));
 
 	/* Start draining existing accessors of the device. */
-	if ((rc = config_detach_children(self, flags)) != 0)
+	if ((rc = config_detach_children(self, flags | DETACH_FORCE)) != 0)
 		return rc;
 	mutex_enter(sc->sc_lock);
 	sc->sc_dying = true;

Reply via email to