From 5706db1deb061ee9affdcea81e59c4c2cad7c41e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C5=91v=C3=A1g=C3=B3=2C=20Zolt=C3=A1n?= Date: Wed, 3 Jun 2015 23:03:47 +0200 Subject: audio: expose drv_opaque to init_out and init_in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently the opaque pointer returned by audio_driver's init is only exposed to the driver's fini, but not to audio_pcm_ops. This way if someone wants to share a variable with the driver and the pcm, he must use global variables. This patch fixes it by adding a third parameter to audio_pcm_op's init_out and init_in. Signed-off-by: Kővágó, Zoltán Signed-off-by: Gerd Hoffmann --- audio/audio_template.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/audio_template.h') diff --git a/audio/audio_template.h b/audio/audio_template.h index 584e536..f716d97 100644 --- a/audio/audio_template.h +++ b/audio/audio_template.h @@ -262,7 +262,7 @@ static HW *glue (audio_pcm_hw_add_new_, TYPE) (struct audsettings *as) #ifdef DAC QLIST_INIT (&hw->cap_head); #endif - if (glue (hw->pcm_ops->init_, TYPE) (hw, as)) { + if (glue (hw->pcm_ops->init_, TYPE) (hw, as, s->drv_opaque)) { goto err0; } -- cgit v1.1