X-Git-Url: http://www.pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=sound%2Fsoc%2Fpxa%2Fspitz.c;h=c4cd2acaacb47a239ffd5cad78d304dc8987012c;hb=ed40d0c472b136682b2fcba05f89762859c7374f;hp=de8778fa872971d3e36a0d422806dd37c9a7b86d;hpb=9e495834e59ca9b29f1a1f63b9f5533bb022ac49;p=linux-2.6-omap-h63xx.git diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c index de8778fa872..c4cd2acaacb 100644 --- a/sound/soc/pxa/spitz.c +++ b/sound/soc/pxa/spitz.c @@ -107,7 +107,7 @@ static void spitz_ext_control(struct snd_soc_codec *codec) static int spitz_startup(struct snd_pcm_substream *substream) { struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_codec *codec = rtd->socdev->codec; + struct snd_soc_codec *codec = rtd->socdev->card->codec; /* check the jack status at stream startup */ spitz_ext_control(codec); @@ -276,7 +276,7 @@ static const struct snd_kcontrol_new wm8750_spitz_controls[] = { */ static int spitz_wm8750_init(struct snd_soc_codec *codec) { - int i, err; + int err; /* NC codec pins */ snd_soc_dapm_nc_pin(codec, "RINPUT1"); @@ -288,12 +288,10 @@ static int spitz_wm8750_init(struct snd_soc_codec *codec) snd_soc_dapm_nc_pin(codec, "MONO1"); /* Add spitz specific controls */ - for (i = 0; i < ARRAY_SIZE(wm8750_spitz_controls); i++) { - err = snd_ctl_add(codec->card, - snd_soc_cnew(&wm8750_spitz_controls[i], codec, NULL)); - if (err < 0) - return err; - } + err = snd_soc_add_controls(codec, wm8750_spitz_controls, + ARRAY_SIZE(wm8750_spitz_controls)); + if (err < 0) + return err; /* Add spitz specific widgets */ snd_soc_dapm_new_controls(codec, wm8750_dapm_widgets,