Module Name:    src
Committed By:   jakllsch
Date:           Sat Aug 13 16:08:23 UTC 2011

Modified Files:
        src/sys/dev/pci/hdaudio: hdaudio.c

Log Message:
detach childern too


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/pci/hdaudio/hdaudio.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/pci/hdaudio/hdaudio.c
diff -u src/sys/dev/pci/hdaudio/hdaudio.c:1.12 src/sys/dev/pci/hdaudio/hdaudio.c:1.13
--- src/sys/dev/pci/hdaudio/hdaudio.c:1.12	Sat Jul  9 16:01:31 2011
+++ src/sys/dev/pci/hdaudio/hdaudio.c	Sat Aug 13 16:08:23 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: hdaudio.c,v 1.12 2011/07/09 16:01:31 riastradh Exp $ */
+/* $NetBSD: hdaudio.c,v 1.13 2011/08/13 16:08:23 jakllsch Exp $ */
 
 /*
  * Copyright (c) 2009 Precedence Technologies Ltd <[email protected]>
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.12 2011/07/09 16:01:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdaudio.c,v 1.13 2011/08/13 16:08:23 jakllsch Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -866,9 +866,17 @@
 int
 hdaudio_detach(struct hdaudio_softc *sc, int flags)
 {
+	int error;
+
 	/* Disable interrupts */
 	hdaudio_intr_disable(sc);
 
+	error = config_detach_children(sc->sc_dev, flags);
+	if (error != 0) {
+		hdaudio_intr_enable(sc);
+		return error;
+	}
+
 	mutex_destroy(&sc->sc_corb_mtx);
 	mutex_destroy(&sc->sc_stream_mtx);
 

Reply via email to