diff mbox

[1/3] ASoC: wm8{350, 753, 971}: Use snd_soc_dapm_to_codec() instead of dapm->codec

Message ID 1411983642-12793-1-git-send-email-lars@metafoo.de (mailing list archive)
State Accepted
Commit 9cca023e5c5c13486d48d47a46564c359af9ae73
Headers show

Commit Message

Lars-Peter Clausen Sept. 29, 2014, 9:40 a.m. UTC
The CODEC struct in the snd_soc_dapm_context struct is deprecated and
scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8350.c | 2 +-
 sound/soc/codecs/wm8753.c | 2 +-
 sound/soc/codecs/wm8971.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Charles Keepax Sept. 29, 2014, 12:53 p.m. UTC | #1
On Mon, Sep 29, 2014 at 11:40:40AM +0200, Lars-Peter Clausen wrote:
> The CODEC struct in the snd_soc_dapm_context struct is deprecated and
> scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

Thanks,
Charles
Mark Brown Sept. 29, 2014, 5:31 p.m. UTC | #2
On Mon, Sep 29, 2014 at 11:40:40AM +0200, Lars-Peter Clausen wrote:
> The CODEC struct in the snd_soc_dapm_context struct is deprecated and
> scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.

Applied all, thanks.
diff mbox

Patch

diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index 3dfdcc4..628ec77 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -212,7 +212,7 @@  static void wm8350_pga_work(struct work_struct *work)
 {
 	struct snd_soc_dapm_context *dapm =
 	    container_of(work, struct snd_soc_dapm_context, delayed_work.work);
-	struct snd_soc_codec *codec = dapm->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
 	struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec);
 	struct wm8350_output *out1 = &wm8350_data->out1,
 	    *out2 = &wm8350_data->out2;
diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index e54e097..21ca3a9 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -1433,7 +1433,7 @@  static void wm8753_work(struct work_struct *work)
 	struct snd_soc_dapm_context *dapm =
 		container_of(work, struct snd_soc_dapm_context,
 			     delayed_work.work);
-	struct snd_soc_codec *codec = dapm->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
 	wm8753_set_bias_level(codec, dapm->bias_level);
 }
 
diff --git a/sound/soc/codecs/wm8971.c b/sound/soc/codecs/wm8971.c
index 0499cd4..39ddb9b 100644
--- a/sound/soc/codecs/wm8971.c
+++ b/sound/soc/codecs/wm8971.c
@@ -615,7 +615,7 @@  static void wm8971_work(struct work_struct *work)
 	struct snd_soc_dapm_context *dapm =
 		container_of(work, struct snd_soc_dapm_context,
 			     delayed_work.work);
-	struct snd_soc_codec *codec = dapm->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm);
 	wm8971_set_bias_level(codec, codec->dapm.bias_level);
 }