diff mbox

[1/2] ASoC: n810: Consistently pass the card DAPM context to n810_ext_control()

Message ID 1428742078-9704-1-git-send-email-lars@metafoo.de (mailing list archive)
State Accepted
Commit d4bdaced1a81ca2953557f8ecae842b42879fda4
Headers show

Commit Message

Lars-Peter Clausen April 11, 2015, 8:47 a.m. UTC
Some callers of n810_ext_control() pass the card DAPM context and some pass
the CODEC DAPM context. Given that some of the widgets that are accessed in
the function are in the card's context, always passing it is the obvious
choice.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/omap/n810.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Brown April 12, 2015, 11:45 a.m. UTC | #1
On Sat, Apr 11, 2015 at 10:47:57AM +0200, Lars-Peter Clausen wrote:
> Some callers of n810_ext_control() pass the card DAPM context and some pass
> the CODEC DAPM context. Given that some of the widgets that are accessed in
> the function are in the card's context, always passing it is the obvious
> choice.

Applied both, thanks.
diff mbox

Patch

diff --git a/sound/soc/omap/n810.c b/sound/soc/omap/n810.c
index 5d7f9ce..617eae3 100644
--- a/sound/soc/omap/n810.c
+++ b/sound/soc/omap/n810.c
@@ -98,12 +98,11 @@  static int n810_startup(struct snd_pcm_substream *substream)
 {
 	struct snd_pcm_runtime *runtime = substream->runtime;
 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_codec *codec = rtd->codec;
 
 	snd_pcm_hw_constraint_minmax(runtime,
 				     SNDRV_PCM_HW_PARAM_CHANNELS, 2, 2);
 
-	n810_ext_control(&codec->dapm);
+	n810_ext_control(&rtd->card->dapm);
 	return clk_prepare_enable(sys_clkout2);
 }