ASoC: arizona: Access driver data through platform from compressed ops
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Wed, 26 Oct 2016 16:06:40 +0000 (17:06 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 26 Oct 2016 16:42:21 +0000 (17:42 +0100)
As the compressed ops run on the platform side of things we should
really access the driver data through the platform pointer rather than
the CODEC pointer. As the compressed DAIs in our systems always connect
our CODEC to our platform this has never been an issue, but should still
be corrected. Additionally it clears the way for future core refactoring
work.

Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs47l24.c
sound/soc/codecs/wm5102.c
sound/soc/codecs/wm5110.c

index f9e720b654541c61d5cedfe013e3c1c1dda6e4e4..1ed1329c31cc60b9853dad0f170fc81e10c8d9cf 100644 (file)
@@ -1066,7 +1066,7 @@ static struct snd_soc_dai_driver cs47l24_dai[] = {
 static int cs47l24_open(struct snd_compr_stream *stream)
 {
        struct snd_soc_pcm_runtime *rtd = stream->private_data;
-       struct cs47l24_priv *priv = snd_soc_codec_get_drvdata(rtd->codec);
+       struct cs47l24_priv *priv = snd_soc_platform_get_drvdata(rtd->platform);
        struct arizona *arizona = priv->core.arizona;
        int n_adsp;
 
index a80a680d1b5bc7123d340258b63cef2b5fad4d13..0136234e6e660858d5eb814a437d9c1a1c34f7e1 100644 (file)
@@ -1908,7 +1908,7 @@ static struct snd_soc_dai_driver wm5102_dai[] = {
 static int wm5102_open(struct snd_compr_stream *stream)
 {
        struct snd_soc_pcm_runtime *rtd = stream->private_data;
-       struct wm5102_priv *priv = snd_soc_codec_get_drvdata(rtd->codec);
+       struct wm5102_priv *priv = snd_soc_platform_get_drvdata(rtd->platform);
 
        return wm_adsp_compr_open(&priv->core.adsp[0], stream);
 }
index f1a41139caf60f42bb059d768509803c4c87f615..a9a8bc98fb29d7e9854f7caf20581ed7e42d5db5 100644 (file)
@@ -2224,7 +2224,7 @@ static struct snd_soc_dai_driver wm5110_dai[] = {
 static int wm5110_open(struct snd_compr_stream *stream)
 {
        struct snd_soc_pcm_runtime *rtd = stream->private_data;
-       struct wm5110_priv *priv = snd_soc_codec_get_drvdata(rtd->codec);
+       struct wm5110_priv *priv = snd_soc_platform_get_drvdata(rtd->platform);
        struct arizona *arizona = priv->core.arizona;
        int n_adsp;