summaryrefslogtreecommitdiff
path: root/sys/dev/audio.c
diff options
context:
space:
mode:
authoruebayasi <uebayasi@NetBSD.org>2014-11-01 05:56:36 +0000
committeruebayasi <uebayasi@NetBSD.org>2014-11-01 05:56:36 +0000
commit12a2576ea3ee88beff976ab14873bb950582c80f (patch)
tree82bd69e73fc1fc2c76986f0368095e32935daf85 /sys/dev/audio.c
parentdb7dbdac18eaf2521d8987159758f0d7c8ab1935 (diff)
audio(4): Fix indirect circular dependency with audio if drivers
Provide audio_attach_mi(4) as inline so that audio if drivers don't need to call functions in audio.c. This way audio if drivers (e.g. auich(4)) can be linked into kernel without audio.c.
Diffstat (limited to 'sys/dev/audio.c')
-rw-r--r--sys/dev/audio.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/sys/dev/audio.c b/sys/dev/audio.c
index 92d0ecba93d..fbb7e4c1d52 100644
--- a/sys/dev/audio.c
+++ b/sys/dev/audio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: audio.c,v 1.263 2014/07/25 08:10:35 dholland Exp $ */
+/* $NetBSD: audio.c,v 1.264 2014/11/01 05:56:36 uebayasi Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -155,7 +155,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.263 2014/07/25 08:10:35 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: audio.c,v 1.264 2014/11/01 05:56:36 uebayasi Exp $");
#include "audio.h"
#if NAUDIO > 0
@@ -829,27 +829,6 @@ au_setup_ports(struct audio_softc *sc, struct au_mixer_ports *ports,
}
}
-/*
- * Called from hardware driver. This is where the MI audio driver gets
- * probed/attached to the hardware driver.
- */
-device_t
-audio_attach_mi(const struct audio_hw_if *ahwp, void *hdlp, device_t dev)
-{
- struct audio_attach_args arg;
-
-#ifdef DIAGNOSTIC
- if (ahwp == NULL) {
- aprint_error("audio_attach_mi: NULL\n");
- return 0;
- }
-#endif
- arg.type = AUDIODEV_TYPE_AUDIO;
- arg.hwif = ahwp;
- arg.hdl = hdlp;
- return config_found(dev, &arg, audioprint);
-}
-
#ifdef AUDIO_DEBUG
void audio_printsc(struct audio_softc *);
void audio_print_params(const char *, struct audio_params *);