All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
@ 2015-01-13  9:27 Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 02/29] ASoC: wm2000: " Lars-Peter Clausen
                   ` (29 more replies)
  0 siblings, 30 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/arizona.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 9550d74..65977bc 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -84,7 +84,7 @@ static int arizona_spk_ev(struct snd_soc_dapm_widget *w,
 			  struct snd_kcontrol *kcontrol,
 			  int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct arizona *arizona = dev_get_drvdata(codec->dev->parent);
 	struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
 	bool manual_ena = false;
@@ -692,7 +692,8 @@ static void arizona_in_set_vu(struct snd_soc_codec *codec, int ena)
 int arizona_in_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol,
 		  int event)
 {
-	struct arizona_priv *priv = snd_soc_codec_get_drvdata(w->codec);
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+	struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
 	unsigned int reg;
 
 	if (w->shift % 2)
@@ -705,25 +706,25 @@ int arizona_in_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol,
 		priv->in_pending++;
 		break;
 	case SND_SOC_DAPM_POST_PMU:
-		snd_soc_update_bits(w->codec, reg, ARIZONA_IN1L_MUTE, 0);
+		snd_soc_update_bits(codec, reg, ARIZONA_IN1L_MUTE, 0);
 
 		/* If this is the last input pending then allow VU */
 		priv->in_pending--;
 		if (priv->in_pending == 0) {
 			msleep(1);
-			arizona_in_set_vu(w->codec, 1);
+			arizona_in_set_vu(codec, 1);
 		}
 		break;
 	case SND_SOC_DAPM_PRE_PMD:
-		snd_soc_update_bits(w->codec, reg,
+		snd_soc_update_bits(codec, reg,
 				    ARIZONA_IN1L_MUTE | ARIZONA_IN_VU,
 				    ARIZONA_IN1L_MUTE | ARIZONA_IN_VU);
 		break;
 	case SND_SOC_DAPM_POST_PMD:
 		/* Disable volume updates if no inputs are enabled */
-		reg = snd_soc_read(w->codec, ARIZONA_INPUT_ENABLES);
+		reg = snd_soc_read(codec, ARIZONA_INPUT_ENABLES);
 		if (reg == 0)
-			arizona_in_set_vu(w->codec, 0);
+			arizona_in_set_vu(codec, 0);
 	}
 
 	return 0;
@@ -760,7 +761,8 @@ int arizona_hp_ev(struct snd_soc_dapm_widget *w,
 		   struct snd_kcontrol *kcontrol,
 		   int event)
 {
-	struct arizona_priv *priv = snd_soc_codec_get_drvdata(w->codec);
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+	struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec);
 	struct arizona *arizona = priv->arizona;
 	unsigned int mask = 1 << w->shift;
 	unsigned int val;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 02/29] ASoC: wm2000: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 03/29] ASoC: wm5102: " Lars-Peter Clausen
                   ` (28 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index 34ef65c..8d9de49 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -683,7 +683,7 @@ static const struct snd_kcontrol_new wm2000_controls[] = {
 static int wm2000_anc_power_event(struct snd_soc_dapm_widget *w,
 				  struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
 	int ret;
 
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 03/29] ASoC: wm5102: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 02/29] ASoC: wm2000: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 04/29] " Lars-Peter Clausen
                   ` (27 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c
index b80970d..ea09db5 100644
--- a/sound/soc/codecs/wm5100.c
+++ b/sound/soc/codecs/wm5100.c
@@ -775,7 +775,8 @@ static int wm5100_out_ev(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol,
 			 int event)
 {
-	struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(w->codec);
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+	struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec);
 
 	switch (w->reg) {
 	case WM5100_CHANNEL_ENABLES_1:
@@ -839,7 +840,7 @@ static int wm5100_post_ev(struct snd_soc_dapm_widget *w,
 			  struct snd_kcontrol *kcontrol,
 			  int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 04/29] ASoC: wm5102: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 02/29] ASoC: wm2000: " Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 03/29] ASoC: wm5102: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 05/29] ASoC: wm5110: " Lars-Peter Clausen
                   ` (26 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index 7dbac8a..1ea9411 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -581,7 +581,7 @@ static const struct reg_default wm5102_sysclk_revb_patch[] = {
 static int wm5102_sysclk_ev(struct snd_soc_dapm_widget *w,
 			    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct arizona *arizona = dev_get_drvdata(codec->dev->parent);
 	struct regmap *regmap = arizona->regmap;
 	const struct reg_default *patch = NULL;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 05/29] ASoC: wm5110: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (2 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 04/29] " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 06/29] ASoC: wm8350: " Lars-Peter Clausen
                   ` (25 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index 4456b38..7cb02e9 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -134,7 +134,7 @@ static const struct reg_default wm5110_sysclk_revd_patch[] = {
 static int wm5110_sysclk_ev(struct snd_soc_dapm_widget *w,
 			    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct arizona *arizona = dev_get_drvdata(codec->dev->parent);
 	struct regmap *regmap = arizona->regmap;
 	const struct reg_default *patch = NULL;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 06/29] ASoC: wm8350: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (3 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 05/29] ASoC: wm5110: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 07/29] ASoC: wm8400: " Lars-Peter Clausen
                   ` (24 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c
index 574579b..c81a9ea 100644
--- a/sound/soc/codecs/wm8350.c
+++ b/sound/soc/codecs/wm8350.c
@@ -259,7 +259,7 @@ static void wm8350_pga_work(struct work_struct *work)
 static int pga_event(struct snd_soc_dapm_widget *w,
 		     struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec);
 	struct wm8350_output *out;
 
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 07/29] ASoC: wm8400: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (4 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 06/29] ASoC: wm8350: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 08/29] ASoC: wm8731: " Lars-Peter Clausen
                   ` (23 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8400.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/wm8400.c b/sound/soc/codecs/wm8400.c
index 8ee4469..b0d84e5 100644
--- a/sound/soc/codecs/wm8400.c
+++ b/sound/soc/codecs/wm8400.c
@@ -324,6 +324,7 @@ SOC_SINGLE("RIN34 Mute Switch", WM8400_RIGHT_LINE_INPUT_3_4_VOLUME,
 static int outmixer_event (struct snd_soc_dapm_widget *w,
 	struct snd_kcontrol * kcontrol, int event)
 {
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct soc_mixer_control *mc =
 		(struct soc_mixer_control *)kcontrol->private_value;
 	u32 reg_shift = mc->shift;
@@ -332,7 +333,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w,
 
 	switch (reg_shift) {
 	case WM8400_SPEAKER_MIXER | (WM8400_LDSPK << 8) :
-		reg = snd_soc_read(w->codec, WM8400_OUTPUT_MIXER1);
+		reg = snd_soc_read(codec, WM8400_OUTPUT_MIXER1);
 		if (reg & WM8400_LDLO) {
 			printk(KERN_WARNING
 			"Cannot set as Output Mixer 1 LDLO Set\n");
@@ -340,7 +341,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w,
 		}
 		break;
 	case WM8400_SPEAKER_MIXER | (WM8400_RDSPK << 8):
-		reg = snd_soc_read(w->codec, WM8400_OUTPUT_MIXER2);
+		reg = snd_soc_read(codec, WM8400_OUTPUT_MIXER2);
 		if (reg & WM8400_RDRO) {
 			printk(KERN_WARNING
 			"Cannot set as Output Mixer 2 RDRO Set\n");
@@ -348,7 +349,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w,
 		}
 		break;
 	case WM8400_OUTPUT_MIXER1 | (WM8400_LDLO << 8):
-		reg = snd_soc_read(w->codec, WM8400_SPEAKER_MIXER);
+		reg = snd_soc_read(codec, WM8400_SPEAKER_MIXER);
 		if (reg & WM8400_LDSPK) {
 			printk(KERN_WARNING
 			"Cannot set as Speaker Mixer LDSPK Set\n");
@@ -356,7 +357,7 @@ static int outmixer_event (struct snd_soc_dapm_widget *w,
 		}
 		break;
 	case WM8400_OUTPUT_MIXER2 | (WM8400_RDRO << 8):
-		reg = snd_soc_read(w->codec, WM8400_SPEAKER_MIXER);
+		reg = snd_soc_read(codec, WM8400_SPEAKER_MIXER);
 		if (reg & WM8400_RDSPK) {
 			printk(KERN_WARNING
 			"Cannot set as Speaker Mixer RDSPK Set\n");
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 08/29] ASoC: wm8731: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (5 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 07/29] ASoC: wm8400: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 09/29] ASoC: wm8770: " Lars-Peter Clausen
                   ` (22 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8731.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index b9211b4..e129c81 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -217,7 +217,8 @@ SND_SOC_DAPM_INPUT("LLINEIN"),
 static int wm8731_check_osc(struct snd_soc_dapm_widget *source,
 			    struct snd_soc_dapm_widget *sink)
 {
-	struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(source->codec);
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm);
+	struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec);
 
 	return wm8731->sysclk_type == WM8731_SYSCLK_XTAL;
 }
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 09/29] ASoC: wm8770: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (6 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 08/29] ASoC: wm8731: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 10/29] ASoC: wm8900: " Lars-Peter Clausen
                   ` (21 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8770.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/wm8770.c b/sound/soc/codecs/wm8770.c
index 180e7a0..53e977d 100644
--- a/sound/soc/codecs/wm8770.c
+++ b/sound/soc/codecs/wm8770.c
@@ -308,9 +308,7 @@ static const struct snd_soc_dapm_route wm8770_intercon[] = {
 static int vout12supply_event(struct snd_soc_dapm_widget *w,
 	struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec;
-
-	codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
@@ -327,9 +325,7 @@ static int vout12supply_event(struct snd_soc_dapm_widget *w,
 static int vout34supply_event(struct snd_soc_dapm_widget *w,
 	struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec;
-
-	codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 10/29] ASoC: wm8900: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (7 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 09/29] ASoC: wm8770: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 11/29] ASoC: wm8903: " Lars-Peter Clausen
                   ` (20 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm8900.c b/sound/soc/codecs/wm8900.c
index 3a0d4b7..2eb986c 100644
--- a/sound/soc/codecs/wm8900.c
+++ b/sound/soc/codecs/wm8900.c
@@ -224,7 +224,7 @@ static void wm8900_reset(struct snd_soc_codec *codec)
 static int wm8900_hp_event(struct snd_soc_dapm_widget *w,
 			   struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	u16 hpctl1 = snd_soc_read(codec, WM8900_REG_HPCTL1);
 
 	switch (event) {
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 11/29] ASoC: wm8903: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (8 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 10/29] ASoC: wm8900: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 12/29] ASoC: wm8904: " Lars-Peter Clausen
                   ` (19 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index cc6b0ef..dde462c 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -260,7 +260,7 @@ static int wm8903_cp_event(struct snd_soc_dapm_widget *w,
 static int wm8903_dcs_event(struct snd_soc_dapm_widget *w,
 			    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 12/29] ASoC: wm8904: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (9 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 11/29] ASoC: wm8903: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 13/29] ASoC: wm8955: " Lars-Peter Clausen
                   ` (18 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8904.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8904.c b/sound/soc/codecs/wm8904.c
index 4d2d2b1..a0f8a62 100644
--- a/sound/soc/codecs/wm8904.c
+++ b/sound/soc/codecs/wm8904.c
@@ -673,7 +673,7 @@ static int cp_event(struct snd_soc_dapm_widget *w,
 static int sysclk_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
@@ -711,7 +711,7 @@ static int sysclk_event(struct snd_soc_dapm_widget *w,
 static int out_pga_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec);
 	int reg, val;
 	int dcs_mask;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 13/29] ASoC: wm8955: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (10 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 12/29] ASoC: wm8904: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 14/29] ASoC: wm8961: " Lars-Peter Clausen
                   ` (17 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm8955.c b/sound/soc/codecs/wm8955.c
index 1173f7f..1ab2d46 100644
--- a/sound/soc/codecs/wm8955.c
+++ b/sound/soc/codecs/wm8955.c
@@ -333,7 +333,7 @@ static int wm8955_configure_clocking(struct snd_soc_codec *codec)
 static int wm8955_sysclk(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	int ret = 0;
 
 	/* Always disable the clocks - if we're doing reconfiguration this
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 14/29] ASoC: wm8961: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (11 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 13/29] ASoC: wm8955: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 15/29] " Lars-Peter Clausen
                   ` (16 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8958-dsp2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/wm8958-dsp2.c b/sound/soc/codecs/wm8958-dsp2.c
index 3cbc82b..c799cca 100644
--- a/sound/soc/codecs/wm8958-dsp2.c
+++ b/sound/soc/codecs/wm8958-dsp2.c
@@ -418,7 +418,7 @@ static void wm8958_dsp_apply(struct snd_soc_codec *codec, int path, int start)
 int wm8958_aif_ev(struct snd_soc_dapm_widget *w,
 		  struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	int i;
 
 	switch (event) {
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 15/29] ASoC: wm8961: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (12 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 14/29] ASoC: wm8961: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 16/29] ASoC: wm8962: " Lars-Peter Clausen
                   ` (15 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8961.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index eeffd05..95e2c1b 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -194,7 +194,7 @@ static bool wm8961_readable(struct device *dev, unsigned int reg)
 static int wm8961_hp_event(struct snd_soc_dapm_widget *w,
 			   struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	u16 hp_reg = snd_soc_read(codec, WM8961_ANALOGUE_HP_0);
 	u16 cp_reg = snd_soc_read(codec, WM8961_CHARGE_PUMP_1);
 	u16 pwr_reg = snd_soc_read(codec, WM8961_PWR_MGMT_2);
@@ -286,7 +286,7 @@ static int wm8961_hp_event(struct snd_soc_dapm_widget *w,
 static int wm8961_spk_event(struct snd_soc_dapm_widget *w,
 			    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	u16 pwr_reg = snd_soc_read(codec, WM8961_PWR_MGMT_2);
 	u16 spk_reg = snd_soc_read(codec, WM8961_CLASS_D_CONTROL_1);
 
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 16/29] ASoC: wm8962: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (13 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 15/29] " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 17/29] ASoC: wm8988: " Lars-Peter Clausen
                   ` (14 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8962.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index d32d554..118b003 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -1866,7 +1866,7 @@ static int cp_event(struct snd_soc_dapm_widget *w,
 static int hp_event(struct snd_soc_dapm_widget *w,
 		    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	int timeout;
 	int reg;
 	int expected = (WM8962_DCS_STARTUP_DONE_HP1L |
@@ -1960,7 +1960,7 @@ static int hp_event(struct snd_soc_dapm_widget *w,
 static int out_pga_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	int reg;
 
 	switch (w->shift) {
@@ -1993,7 +1993,7 @@ static int out_pga_event(struct snd_soc_dapm_widget *w,
 static int dsp2_event(struct snd_soc_dapm_widget *w,
 		      struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 17/29] ASoC: wm8988: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (14 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 16/29] ASoC: wm8962: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 18/29] ASoC: wm8990: " Lars-Peter Clausen
                   ` (13 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm8988.c b/sound/soc/codecs/wm8988.c
index d320c52..24968aa 100644
--- a/sound/soc/codecs/wm8988.c
+++ b/sound/soc/codecs/wm8988.c
@@ -244,7 +244,7 @@ SOC_DOUBLE_R_TLV("Output 2 Playback Volume", WM8988_LOUT2V, WM8988_ROUT2V,
 static int wm8988_lrc_control(struct snd_soc_dapm_widget *w,
 			      struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	u16 adctl2 = snd_soc_read(codec, WM8988_ADCTL2);
 
 	/* Use the DAC to gate LRC if active, otherwise use ADC */
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 18/29] ASoC: wm8990: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (15 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 17/29] ASoC: wm8988: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 19/29] ASoC: wm8991: " Lars-Peter Clausen
                   ` (12 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8990.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/wm8990.c b/sound/soc/codecs/wm8990.c
index 8a58422..c93bffc 100644
--- a/sound/soc/codecs/wm8990.c
+++ b/sound/soc/codecs/wm8990.c
@@ -374,13 +374,14 @@ SOC_SINGLE("RIN34 Mute Switch", WM8990_RIGHT_LINE_INPUT_3_4_VOLUME,
 static int outmixer_event(struct snd_soc_dapm_widget *w,
 	struct snd_kcontrol *kcontrol, int event)
 {
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	u32 reg_shift = kcontrol->private_value & 0xfff;
 	int ret = 0;
 	u16 reg;
 
 	switch (reg_shift) {
 	case WM8990_SPEAKER_MIXER | (WM8990_LDSPK_BIT << 8) :
-		reg = snd_soc_read(w->codec, WM8990_OUTPUT_MIXER1);
+		reg = snd_soc_read(codec, WM8990_OUTPUT_MIXER1);
 		if (reg & WM8990_LDLO) {
 			printk(KERN_WARNING
 			"Cannot set as Output Mixer 1 LDLO Set\n");
@@ -388,7 +389,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
 		}
 		break;
 	case WM8990_SPEAKER_MIXER | (WM8990_RDSPK_BIT << 8):
-		reg = snd_soc_read(w->codec, WM8990_OUTPUT_MIXER2);
+		reg = snd_soc_read(codec, WM8990_OUTPUT_MIXER2);
 		if (reg & WM8990_RDRO) {
 			printk(KERN_WARNING
 			"Cannot set as Output Mixer 2 RDRO Set\n");
@@ -396,7 +397,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
 		}
 		break;
 	case WM8990_OUTPUT_MIXER1 | (WM8990_LDLO_BIT << 8):
-		reg = snd_soc_read(w->codec, WM8990_SPEAKER_MIXER);
+		reg = snd_soc_read(codec, WM8990_SPEAKER_MIXER);
 		if (reg & WM8990_LDSPK) {
 			printk(KERN_WARNING
 			"Cannot set as Speaker Mixer LDSPK Set\n");
@@ -404,7 +405,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
 		}
 		break;
 	case WM8990_OUTPUT_MIXER2 | (WM8990_RDRO_BIT << 8):
-		reg = snd_soc_read(w->codec, WM8990_SPEAKER_MIXER);
+		reg = snd_soc_read(codec, WM8990_SPEAKER_MIXER);
 		if (reg & WM8990_RDSPK) {
 			printk(KERN_WARNING
 			"Cannot set as Speaker Mixer RDSPK Set\n");
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 19/29] ASoC: wm8991: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (16 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 18/29] ASoC: wm8990: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 20/29] ASoC: wm8993: " Lars-Peter Clausen
                   ` (11 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8991.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/sound/soc/codecs/wm8991.c b/sound/soc/codecs/wm8991.c
index b0ac2c3..49df0dc 100644
--- a/sound/soc/codecs/wm8991.c
+++ b/sound/soc/codecs/wm8991.c
@@ -382,13 +382,14 @@ static const struct snd_kcontrol_new wm8991_snd_controls[] = {
 static int outmixer_event(struct snd_soc_dapm_widget *w,
 			  struct snd_kcontrol *kcontrol, int event)
 {
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	u32 reg_shift = kcontrol->private_value & 0xfff;
 	int ret = 0;
 	u16 reg;
 
 	switch (reg_shift) {
 	case WM8991_SPEAKER_MIXER | (WM8991_LDSPK_BIT << 8):
-		reg = snd_soc_read(w->codec, WM8991_OUTPUT_MIXER1);
+		reg = snd_soc_read(codec, WM8991_OUTPUT_MIXER1);
 		if (reg & WM8991_LDLO) {
 			printk(KERN_WARNING
 			       "Cannot set as Output Mixer 1 LDLO Set\n");
@@ -397,7 +398,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
 		break;
 
 	case WM8991_SPEAKER_MIXER | (WM8991_RDSPK_BIT << 8):
-		reg = snd_soc_read(w->codec, WM8991_OUTPUT_MIXER2);
+		reg = snd_soc_read(codec, WM8991_OUTPUT_MIXER2);
 		if (reg & WM8991_RDRO) {
 			printk(KERN_WARNING
 			       "Cannot set as Output Mixer 2 RDRO Set\n");
@@ -406,7 +407,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
 		break;
 
 	case WM8991_OUTPUT_MIXER1 | (WM8991_LDLO_BIT << 8):
-		reg = snd_soc_read(w->codec, WM8991_SPEAKER_MIXER);
+		reg = snd_soc_read(codec, WM8991_SPEAKER_MIXER);
 		if (reg & WM8991_LDSPK) {
 			printk(KERN_WARNING
 			       "Cannot set as Speaker Mixer LDSPK Set\n");
@@ -415,7 +416,7 @@ static int outmixer_event(struct snd_soc_dapm_widget *w,
 		break;
 
 	case WM8991_OUTPUT_MIXER2 | (WM8991_RDRO_BIT << 8):
-		reg = snd_soc_read(w->codec, WM8991_SPEAKER_MIXER);
+		reg = snd_soc_read(codec, WM8991_SPEAKER_MIXER);
 		if (reg & WM8991_RDSPK) {
 			printk(KERN_WARNING
 			       "Cannot set as Speaker Mixer RDSPK Set\n");
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 20/29] ASoC: wm8993: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (17 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 19/29] ASoC: wm8991: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 21/29] ASoC: wm8995: " Lars-Peter Clausen
                   ` (10 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm8993.c b/sound/soc/codecs/wm8993.c
index 53c6fe3..2e70a270 100644
--- a/sound/soc/codecs/wm8993.c
+++ b/sound/soc/codecs/wm8993.c
@@ -810,7 +810,7 @@ SOC_SINGLE_TLV("EQ5 Volume", WM8993_EQ6, 0, 24, 0, eq_tlv),
 static int clk_sys_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 21/29] ASoC: wm8995: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (18 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 20/29] ASoC: wm8993: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 22/29] " Lars-Peter Clausen
                   ` (9 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8994.c | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c
index 1b97de2..4fbc768 100644
--- a/sound/soc/codecs/wm8994.c
+++ b/sound/soc/codecs/wm8994.c
@@ -249,7 +249,8 @@ static int configure_clock(struct snd_soc_codec *codec)
 static int check_clk_sys(struct snd_soc_dapm_widget *source,
 			 struct snd_soc_dapm_widget *sink)
 {
-	int reg = snd_soc_read(source->codec, WM8994_CLOCKING_1);
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm);
+	int reg = snd_soc_read(codec, WM8994_CLOCKING_1);
 	const char *clk;
 
 	/* Check what we're currently using for CLK_SYS */
@@ -806,7 +807,7 @@ static void active_dereference(struct snd_soc_codec *codec)
 static int clk_sys_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
@@ -981,7 +982,7 @@ static void vmid_dereference(struct snd_soc_codec *codec)
 static int vmid_event(struct snd_soc_dapm_widget *w,
 		      struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
@@ -1037,7 +1038,7 @@ static bool wm8994_check_class_w_digital(struct snd_soc_codec *codec)
 static int aif1clk_ev(struct snd_soc_dapm_widget *w,
 		      struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
 	struct wm8994 *control = wm8994->wm8994;
 	int mask = WM8994_AIF1DAC1L_ENA | WM8994_AIF1DAC1R_ENA;
@@ -1135,7 +1136,7 @@ static int aif1clk_ev(struct snd_soc_dapm_widget *w,
 static int aif2clk_ev(struct snd_soc_dapm_widget *w,
 		      struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	int i;
 	int dac;
 	int adc;
@@ -1220,7 +1221,7 @@ static int aif2clk_ev(struct snd_soc_dapm_widget *w,
 static int aif1clk_late_ev(struct snd_soc_dapm_widget *w,
 			   struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
@@ -1238,7 +1239,7 @@ static int aif1clk_late_ev(struct snd_soc_dapm_widget *w,
 static int aif2clk_late_ev(struct snd_soc_dapm_widget *w,
 			   struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
@@ -1256,7 +1257,7 @@ static int aif2clk_late_ev(struct snd_soc_dapm_widget *w,
 static int late_enable_ev(struct snd_soc_dapm_widget *w,
 			  struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
@@ -1289,7 +1290,7 @@ static int late_enable_ev(struct snd_soc_dapm_widget *w,
 static int late_disable_ev(struct snd_soc_dapm_widget *w,
 			   struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
@@ -1331,7 +1332,7 @@ static int micbias_ev(struct snd_soc_dapm_widget *w,
 static int dac_ev(struct snd_soc_dapm_widget *w,
 		  struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	unsigned int mask = 1 << w->shift;
 
 	snd_soc_update_bits(codec, WM8994_POWER_MANAGEMENT_5,
@@ -1372,7 +1373,7 @@ SOC_DAPM_SINGLE("DAC1 Switch", WM8994_SPEAKER_MIXER, 0, 1, 0),
 static int post_ev(struct snd_soc_dapm_widget *w,
 	    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	dev_dbg(codec->dev, "SRC status: %x\n",
 		snd_soc_read(codec,
 			     WM8994_RATE_STATUS));
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 22/29] ASoC: wm8995: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (19 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 21/29] ASoC: wm8995: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 23/29] ASoC: wm8996: " Lars-Peter Clausen
                   ` (8 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8995.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c
index 120228b..66103c2 100644
--- a/sound/soc/codecs/wm8995.c
+++ b/sound/soc/codecs/wm8995.c
@@ -534,10 +534,11 @@ static void wm8995_update_class_w(struct snd_soc_codec *codec)
 static int check_clk_sys(struct snd_soc_dapm_widget *source,
 			 struct snd_soc_dapm_widget *sink)
 {
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm);
 	unsigned int reg;
 	const char *clk;
 
-	reg = snd_soc_read(source->codec, WM8995_CLOCKING_1);
+	reg = snd_soc_read(codec, WM8995_CLOCKING_1);
 	/* Check what we're currently using for CLK_SYS */
 	if (reg & WM8995_SYSCLK_SRC)
 		clk = "AIF2CLK";
@@ -560,9 +561,7 @@ static int wm8995_put_class_w(struct snd_kcontrol *kcontrol,
 static int hp_supply_event(struct snd_soc_dapm_widget *w,
 			   struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec;
-
-	codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
@@ -611,10 +610,9 @@ static void dc_servo_cmd(struct snd_soc_codec *codec,
 static int hp_event(struct snd_soc_dapm_widget *w,
 		    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	unsigned int reg;
 
-	codec = w->codec;
 	reg = snd_soc_read(codec, WM8995_ANALOGUE_HP_1);
 
 	switch (event) {
@@ -761,9 +759,7 @@ static int configure_clock(struct snd_soc_codec *codec)
 static int clk_sys_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec;
-
-	codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 23/29] ASoC: wm8996: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (20 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 22/29] " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 24/29] ASoC: wm8997: " Lars-Peter Clausen
                   ` (7 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm8996.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c
index b1dcc11..dc92d5e 100644
--- a/sound/soc/codecs/wm8996.c
+++ b/sound/soc/codecs/wm8996.c
@@ -599,7 +599,7 @@ static void wm8996_bg_disable(struct snd_soc_codec *codec)
 static int bg_event(struct snd_soc_dapm_widget *w,
 		    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	int ret = 0;
 
 	switch (event) {
@@ -634,7 +634,8 @@ static int cp_event(struct snd_soc_dapm_widget *w,
 static int rmv_short_event(struct snd_soc_dapm_widget *w,
 			   struct snd_kcontrol *kcontrol, int event)
 {
-	struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(w->codec);
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+	struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
 
 	/* Record which outputs we enabled */
 	switch (event) {
@@ -758,7 +759,8 @@ static void wm8996_seq_notifier(struct snd_soc_dapm_context *dapm,
 static int dcs_start(struct snd_soc_dapm_widget *w,
 		     struct snd_kcontrol *kcontrol, int event)
 {
-	struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(w->codec);
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
+	struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
 	case SND_SOC_DAPM_POST_PMU:
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 24/29] ASoC: wm8997: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (21 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 23/29] ASoC: wm8996: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 25/29] ASoC: wm9081: " Lars-Peter Clausen
                   ` (6 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c
index 7e8bfe2..0760ede 100644
--- a/sound/soc/codecs/wm8997.c
+++ b/sound/soc/codecs/wm8997.c
@@ -84,7 +84,7 @@ static const struct reg_default wm8997_sysclk_reva_patch[] = {
 static int wm8997_sysclk_ev(struct snd_soc_dapm_widget *w,
 			    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct arizona *arizona = dev_get_drvdata(codec->dev->parent);
 	struct regmap *regmap = arizona->regmap;
 	const struct reg_default *patch = NULL;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 25/29] ASoC: wm9081: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (22 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 24/29] ASoC: wm8997: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 26/29] ASoC: wm9090: " Lars-Peter Clausen
                   ` (5 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm9081.c b/sound/soc/codecs/wm9081.c
index b1d946f..13a3f33 100644
--- a/sound/soc/codecs/wm9081.c
+++ b/sound/soc/codecs/wm9081.c
@@ -734,7 +734,7 @@ static int configure_clock(struct snd_soc_codec *codec)
 static int clk_sys_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec);
 
 	/* This should be done on init() for bypass paths */
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 26/29] ASoC: wm9090: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (23 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 25/29] ASoC: wm9081: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 27/29] ASoC: wm9713: " Lars-Peter Clausen
                   ` (4 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm9090.c b/sound/soc/codecs/wm9090.c
index 6ffe8dc..60d243c 100644
--- a/sound/soc/codecs/wm9090.c
+++ b/sound/soc/codecs/wm9090.c
@@ -254,7 +254,7 @@ SOC_SINGLE_TLV("MIXOUTR IN2B Volume", WM9090_OUTPUT_MIXER4, 0, 3, 1,
 static int hp_ev(struct snd_soc_dapm_widget *w,
 		 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	unsigned int reg = snd_soc_read(codec, WM9090_ANALOGUE_HP_0);
 
 	switch (event) {
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 27/29] ASoC: wm9713: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (24 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 26/29] ASoC: wm9090: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 28/29] ASoC: wm_adsp: " Lars-Peter Clausen
                   ` (3 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

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

diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c
index 71b9d5b..e5807de 100644
--- a/sound/soc/codecs/wm9713.c
+++ b/sound/soc/codecs/wm9713.c
@@ -217,7 +217,7 @@ SOC_SINGLE("3D Depth", AC97_REC_GAIN_MIC, 0, 15, 1),
 static int wm9713_voice_shutdown(struct snd_soc_dapm_widget *w,
 				 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	u16 status, rate;
 
 	if (WARN_ON(event != SND_SOC_DAPM_PRE_PMD))
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 28/29] ASoC: wm_adsp: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (25 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 27/29] ASoC: wm9713: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-13  9:27 ` [PATCH 29/29] ASoC: wm_hubs: " Lars-Peter Clausen
                   ` (2 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm_adsp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c
index 720d6e8..ff67b33 100644
--- a/sound/soc/codecs/wm_adsp.c
+++ b/sound/soc/codecs/wm_adsp.c
@@ -1373,7 +1373,7 @@ int wm_adsp1_event(struct snd_soc_dapm_widget *w,
 		   struct snd_kcontrol *kcontrol,
 		   int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm_adsp *dsps = snd_soc_codec_get_drvdata(codec);
 	struct wm_adsp *dsp = &dsps[w->shift];
 	struct wm_adsp_alg_region *alg_region;
@@ -1605,7 +1605,7 @@ err:
 int wm_adsp2_early_event(struct snd_soc_dapm_widget *w,
 		   struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm_adsp *dsps = snd_soc_codec_get_drvdata(codec);
 	struct wm_adsp *dsp = &dsps[w->shift];
 
@@ -1626,7 +1626,7 @@ EXPORT_SYMBOL_GPL(wm_adsp2_early_event);
 int wm_adsp2_event(struct snd_soc_dapm_widget *w,
 		   struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm_adsp *dsps = snd_soc_codec_get_drvdata(codec);
 	struct wm_adsp *dsp = &dsps[w->shift];
 	struct wm_adsp_alg_region *alg_region;
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* [PATCH 29/29] ASoC: wm_hubs: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (26 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 28/29] ASoC: wm_adsp: " Lars-Peter Clausen
@ 2015-01-13  9:27 ` Lars-Peter Clausen
  2015-01-14 10:45 ` [PATCH 01/29] ASoC: arizona: " Charles Keepax
  2015-01-14 19:54 ` Mark Brown
  29 siblings, 0 replies; 31+ messages in thread
From: Lars-Peter Clausen @ 2015-01-13  9:27 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Charles Keepax, patches, alsa-devel, Lars-Peter Clausen

The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/codecs/wm_hubs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/wm_hubs.c b/sound/soc/codecs/wm_hubs.c
index 374537d..8366e19 100644
--- a/sound/soc/codecs/wm_hubs.c
+++ b/sound/soc/codecs/wm_hubs.c
@@ -500,7 +500,7 @@ SOC_SINGLE_TLV("LINEOUT2 Volume", WM8993_LINE_OUTPUTS_VOLUME, 0, 1, 1,
 static int hp_supply_event(struct snd_soc_dapm_widget *w,
 			   struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
 
 	switch (event) {
@@ -542,7 +542,7 @@ static int hp_supply_event(struct snd_soc_dapm_widget *w,
 static int hp_event(struct snd_soc_dapm_widget *w,
 		    struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	unsigned int reg = snd_soc_read(codec, WM8993_ANALOGUE_HP_0);
 
 	switch (event) {
@@ -594,7 +594,7 @@ static int hp_event(struct snd_soc_dapm_widget *w,
 static int earpiece_event(struct snd_soc_dapm_widget *w,
 			  struct snd_kcontrol *control, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	u16 reg = snd_soc_read(codec, WM8993_ANTIPOP1) & ~WM8993_HPOUT2_IN_ENA;
 
 	switch (event) {
@@ -619,7 +619,7 @@ static int earpiece_event(struct snd_soc_dapm_widget *w,
 static int lineout_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *control, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
 	bool *flag;
 
@@ -649,7 +649,7 @@ static int lineout_event(struct snd_soc_dapm_widget *w,
 static int micbias_event(struct snd_soc_dapm_widget *w,
 			 struct snd_kcontrol *kcontrol, int event)
 {
-	struct snd_soc_codec *codec = w->codec;
+	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
 	struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec);
 
 	switch (w->shift) {
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 31+ messages in thread

* Re: [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (27 preceding siblings ...)
  2015-01-13  9:27 ` [PATCH 29/29] ASoC: wm_hubs: " Lars-Peter Clausen
@ 2015-01-14 10:45 ` Charles Keepax
  2015-01-14 19:54 ` Mark Brown
  29 siblings, 0 replies; 31+ messages in thread
From: Charles Keepax @ 2015-01-14 10:45 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: alsa-devel, Mark Brown, Liam Girdwood, patches

On Tue, Jan 13, 2015 at 10:27:07AM +0100, Lars-Peter Clausen wrote:
> The codec field of the snd_soc_widget struct is eventually going to be
> removed, use snd_soc_dapm_to_codec(w->dapm) instead.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> ---

Whole series looks good to me:

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

Thanks,
Charles

^ permalink raw reply	[flat|nested] 31+ messages in thread

* Re: [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm)
  2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
                   ` (28 preceding siblings ...)
  2015-01-14 10:45 ` [PATCH 01/29] ASoC: arizona: " Charles Keepax
@ 2015-01-14 19:54 ` Mark Brown
  29 siblings, 0 replies; 31+ messages in thread
From: Mark Brown @ 2015-01-14 19:54 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: Charles Keepax, patches, Liam Girdwood, alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 218 bytes --]

On Tue, Jan 13, 2015 at 10:27:07AM +0100, Lars-Peter Clausen wrote:
> The codec field of the snd_soc_widget struct is eventually going to be
> removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Applied all, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2015-01-14 19:54 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-13  9:27 [PATCH 01/29] ASoC: arizona: Replace w->codec snd_soc_dapm_to_codec(w->dapm) Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 02/29] ASoC: wm2000: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 03/29] ASoC: wm5102: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 04/29] " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 05/29] ASoC: wm5110: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 06/29] ASoC: wm8350: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 07/29] ASoC: wm8400: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 08/29] ASoC: wm8731: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 09/29] ASoC: wm8770: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 10/29] ASoC: wm8900: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 11/29] ASoC: wm8903: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 12/29] ASoC: wm8904: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 13/29] ASoC: wm8955: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 14/29] ASoC: wm8961: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 15/29] " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 16/29] ASoC: wm8962: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 17/29] ASoC: wm8988: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 18/29] ASoC: wm8990: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 19/29] ASoC: wm8991: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 20/29] ASoC: wm8993: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 21/29] ASoC: wm8995: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 22/29] " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 23/29] ASoC: wm8996: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 24/29] ASoC: wm8997: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 25/29] ASoC: wm9081: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 26/29] ASoC: wm9090: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 27/29] ASoC: wm9713: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 28/29] ASoC: wm_adsp: " Lars-Peter Clausen
2015-01-13  9:27 ` [PATCH 29/29] ASoC: wm_hubs: " Lars-Peter Clausen
2015-01-14 10:45 ` [PATCH 01/29] ASoC: arizona: " Charles Keepax
2015-01-14 19:54 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.