diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-02-17 03:15:56 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-17 11:09:33 -0500 |
commit | 059ad7602889aa724adb84298dccae92534b7697 (patch) | |
tree | 54e4b24109b347365df4ccb8e7f6faa6afbc7de3 /sound | |
parent | a1fa92130c12c6a5abcfc8b960e442f87ebea475 (diff) |
ASoC: Change spitz_ext_control to take dapm as argument.
This fixes below build warning:
CC sound/soc/pxa/spitz.o
sound/soc/pxa/spitz.c: In function 'spitz_startup':
sound/soc/pxa/spitz.c:116: warning: passing argument 1 of 'spitz_ext_control' from incompatible pointer type
sound/soc/pxa/spitz.c:47: note: expected 'struct snd_soc_card *' but argument is of type 'struct snd_soc_codec *'
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/pxa/spitz.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index 4d108dc52e2e..fc052d8247ff 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c | |||
@@ -44,10 +44,8 @@ static int spitz_jack_func; | |||
44 | static int spitz_spk_func; | 44 | static int spitz_spk_func; |
45 | static int spitz_mic_gpio; | 45 | static int spitz_mic_gpio; |
46 | 46 | ||
47 | static void spitz_ext_control(struct snd_soc_card *card) | 47 | static void spitz_ext_control(struct snd_soc_dapm_context *dapm) |
48 | { | 48 | { |
49 | struct snd_soc_dapm_context *dapm = &card->dapm; | ||
50 | |||
51 | if (spitz_spk_func == SPITZ_SPK_ON) | 49 | if (spitz_spk_func == SPITZ_SPK_ON) |
52 | snd_soc_dapm_enable_pin(dapm, "Ext Spk"); | 50 | snd_soc_dapm_enable_pin(dapm, "Ext Spk"); |
53 | else | 51 | else |
@@ -113,7 +111,7 @@ static int spitz_startup(struct snd_pcm_substream *substream) | |||
113 | mutex_lock(&codec->mutex); | 111 | mutex_lock(&codec->mutex); |
114 | 112 | ||
115 | /* check the jack status at stream startup */ | 113 | /* check the jack status at stream startup */ |
116 | spitz_ext_control(codec); | 114 | spitz_ext_control(&codec->dapm); |
117 | 115 | ||
118 | mutex_unlock(&codec->mutex); | 116 | mutex_unlock(&codec->mutex); |
119 | 117 | ||
@@ -179,7 +177,7 @@ static int spitz_set_jack(struct snd_kcontrol *kcontrol, | |||
179 | return 0; | 177 | return 0; |
180 | 178 | ||
181 | spitz_jack_func = ucontrol->value.integer.value[0]; | 179 | spitz_jack_func = ucontrol->value.integer.value[0]; |
182 | spitz_ext_control(card); | 180 | spitz_ext_control(&card->dapm); |
183 | return 1; | 181 | return 1; |
184 | } | 182 | } |
185 | 183 | ||
@@ -193,13 +191,13 @@ static int spitz_get_spk(struct snd_kcontrol *kcontrol, | |||
193 | static int spitz_set_spk(struct snd_kcontrol *kcontrol, | 191 | static int spitz_set_spk(struct snd_kcontrol *kcontrol, |
194 | struct snd_ctl_elem_value *ucontrol) | 192 | struct snd_ctl_elem_value *ucontrol) |
195 | { | 193 | { |
196 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); | 194 | struct snd_soc_card *card = snd_kcontrol_chip(kcontrol); |
197 | 195 | ||
198 | if (spitz_spk_func == ucontrol->value.integer.value[0]) | 196 | if (spitz_spk_func == ucontrol->value.integer.value[0]) |
199 | return 0; | 197 | return 0; |
200 | 198 | ||
201 | spitz_spk_func = ucontrol->value.integer.value[0]; | 199 | spitz_spk_func = ucontrol->value.integer.value[0]; |
202 | spitz_ext_control(card); | 200 | spitz_ext_control(&card->dapm); |
203 | return 1; | 201 | return 1; |
204 | } | 202 | } |
205 | 203 | ||