ASoC: n810: Consistently pass the card DAPM context to n810_ext_control()
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 11 Apr 2015 08:47:57 +0000 (10:47 +0200)
committerMark Brown <broonie@kernel.org>
Sun, 12 Apr 2015 11:45:11 +0000 (12:45 +0100)
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>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/omap/n810.c

index 5d7f9cebe04142fd9faf0974030ff4e41ccd2664..617eae37581c2f9e40cd2abf762c9da84e92d7ea 100644 (file)
@@ -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);
 }