diff options
Diffstat (limited to 'sound/soc/pxa/spitz.c')
-rw-r--r-- | sound/soc/pxa/spitz.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index a3b9e6bdf979..c4cd2acaacb4 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c | |||
@@ -26,8 +26,6 @@ | |||
26 | #include <sound/soc-dapm.h> | 26 | #include <sound/soc-dapm.h> |
27 | 27 | ||
28 | #include <asm/mach-types.h> | 28 | #include <asm/mach-types.h> |
29 | #include <mach/pxa-regs.h> | ||
30 | #include <mach/hardware.h> | ||
31 | #include <mach/spitz.h> | 29 | #include <mach/spitz.h> |
32 | #include "../codecs/wm8750.h" | 30 | #include "../codecs/wm8750.h" |
33 | #include "pxa2xx-pcm.h" | 31 | #include "pxa2xx-pcm.h" |
@@ -109,7 +107,7 @@ static void spitz_ext_control(struct snd_soc_codec *codec) | |||
109 | static int spitz_startup(struct snd_pcm_substream *substream) | 107 | static int spitz_startup(struct snd_pcm_substream *substream) |
110 | { | 108 | { |
111 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 109 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
112 | struct snd_soc_codec *codec = rtd->socdev->codec; | 110 | struct snd_soc_codec *codec = rtd->socdev->card->codec; |
113 | 111 | ||
114 | /* check the jack status at stream startup */ | 112 | /* check the jack status at stream startup */ |
115 | spitz_ext_control(codec); | 113 | spitz_ext_control(codec); |
@@ -278,7 +276,7 @@ static const struct snd_kcontrol_new wm8750_spitz_controls[] = { | |||
278 | */ | 276 | */ |
279 | static int spitz_wm8750_init(struct snd_soc_codec *codec) | 277 | static int spitz_wm8750_init(struct snd_soc_codec *codec) |
280 | { | 278 | { |
281 | int i, err; | 279 | int err; |
282 | 280 | ||
283 | /* NC codec pins */ | 281 | /* NC codec pins */ |
284 | snd_soc_dapm_nc_pin(codec, "RINPUT1"); | 282 | snd_soc_dapm_nc_pin(codec, "RINPUT1"); |
@@ -290,12 +288,10 @@ static int spitz_wm8750_init(struct snd_soc_codec *codec) | |||
290 | snd_soc_dapm_nc_pin(codec, "MONO1"); | 288 | snd_soc_dapm_nc_pin(codec, "MONO1"); |
291 | 289 | ||
292 | /* Add spitz specific controls */ | 290 | /* Add spitz specific controls */ |
293 | for (i = 0; i < ARRAY_SIZE(wm8750_spitz_controls); i++) { | 291 | err = snd_soc_add_controls(codec, wm8750_spitz_controls, |
294 | err = snd_ctl_add(codec->card, | 292 | ARRAY_SIZE(wm8750_spitz_controls)); |
295 | snd_soc_cnew(&wm8750_spitz_controls[i], codec, NULL)); | 293 | if (err < 0) |
296 | if (err < 0) | 294 | return err; |
297 | return err; | ||
298 | } | ||
299 | 295 | ||
300 | /* Add spitz specific widgets */ | 296 | /* Add spitz specific widgets */ |
301 | snd_soc_dapm_new_controls(codec, wm8750_dapm_widgets, | 297 | snd_soc_dapm_new_controls(codec, wm8750_dapm_widgets, |