summaryrefslogtreecommitdiff
path: root/sound/soc/pxa/spitz.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-03-28 20:29:51 +0000
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-03-28 20:29:51 +0000
commited40d0c472b136682b2fcba05f89762859c7374f (patch)
tree076b83a26bcd63d6158463735dd34c10bbc591dc /sound/soc/pxa/spitz.c
parent9e495834e59ca9b29f1a1f63b9f5533bb022ac49 (diff)
parent5d80f8e5a9dc9c9a94d4aeaa567e219a808b8a4a (diff)
Merge branch 'origin' into devel
Conflicts: sound/soc/pxa/pxa2xx-i2s.c
Diffstat (limited to 'sound/soc/pxa/spitz.c')
-rw-r--r--sound/soc/pxa/spitz.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sound/soc/pxa/spitz.c b/sound/soc/pxa/spitz.c
index de8778fa8729..c4cd2acaacb4 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,