Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev add a helper function to get the hw device_t from an...



details:   https://anonhg.NetBSD.org/src/rev/4f97bf2136be
branches:  trunk
changeset: 803970:4f97bf2136be
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Tue Nov 18 01:50:12 2014 +0000

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

diffstat:

 sys/dev/audio.c    |  12 ++++++++++--
 sys/dev/audio_if.h |   5 ++++-
 2 files changed, 14 insertions(+), 3 deletions(-)

diffs (52 lines):

diff -r 478d47455e8f -r 4f97bf2136be sys/dev/audio.c
--- a/sys/dev/audio.c   Mon Nov 17 18:43:48 2014 +0000
+++ b/sys/dev/audio.c   Tue Nov 18 01:50:12 2014 +0000
@@ -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 @@
 #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)
 {
diff -r 478d47455e8f -r 4f97bf2136be sys/dev/audio_if.h
--- a/sys/dev/audio_if.h        Mon Nov 17 18:43:48 2014 +0000
+++ b/sys/dev/audio_if.h        Tue Nov 18 01:50:12 2014 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index