Module Name:    src
Committed By:   jmcneill
Date:           Tue Nov 18 01:50:12 UTC 2014

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

Log Message:
add a helper function to get the hw device_t from an audio_softc


To generate a diff of this commit:
cvs rdiff -u -r1.265 -r1.266 src/sys/dev/audio.c
cvs rdiff -u -r1.69 -r1.70 src/sys/dev/audio_if.h

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.265 src/sys/dev/audio.c:1.266
--- src/sys/dev/audio.c:1.265	Sat Nov  1 07:54:18 2014
+++ src/sys/dev/audio.c	Tue Nov 18 01:50:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio.c,v 1.265 2014/11/01 07:54:18 uebayasi Exp $	*/
+/*	$NetBSD: audio.c,v 1.266 2014/11/18 01:50:12 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.265 2014/11/01 07:54:18 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.266 2014/11/18 01:50:12 jmcneill Exp $");
 
 #include "audio.h"
 #if NAUDIO > 0
@@ -4246,6 +4246,14 @@ audioprint(void *aux, const char *pnp)
 #endif /* NAUDIO > 0 || (NMIDI > 0 || NMIDIBUS > 0) */
 
 #if NAUDIO > 0
+device_t
+audio_get_device(struct audio_softc *sc)
+{
+	return sc->sc_dev;
+}
+#endif
+
+#if NAUDIO > 0
 static void
 audio_mixer_capture(struct audio_softc *sc)
 {

Index: src/sys/dev/audio_if.h
diff -u src/sys/dev/audio_if.h:1.69 src/sys/dev/audio_if.h:1.70
--- src/sys/dev/audio_if.h:1.69	Sat Nov  1 07:54:18 2014
+++ src/sys/dev/audio_if.h	Tue Nov 18 01:50:12 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: audio_if.h,v 1.69 2014/11/01 07:54:18 uebayasi Exp $	*/
+/*	$NetBSD: audio_if.h,v 1.70 2014/11/18 01:50:12 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 1994 Havard Eidnes.
@@ -258,6 +258,9 @@ struct audio_attach_args {
 device_t audio_attach_mi(const struct audio_hw_if *, void *, device_t);
 int	audioprint(void *, const char *);
 
+/* Get the hw device from an audio softc */
+device_t audio_get_device(struct audio_softc *);
+
 /* Device identity flags */
 #define SOUND_DEVICE		0
 #define AUDIO_DEVICE		0x80

Reply via email to