summaryrefslogtreecommitdiffstats
path: root/sound/soc/pxa/palm27x.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-03-24 00:35:53 +0100
committerTakashi Iwai <tiwai@suse.de>2009-03-24 00:35:53 +0100
commitb5c784894c90042f4fc6348aedc7524e899df281 (patch)
tree0db86a93d73e4aabca04e361d7e6807aa4c1d307 /sound/soc/pxa/palm27x.c
parentff4fc3656e489ed6ee575959b0510286aefe1e20 (diff)
parent1f2186951e02f2a5bcda9459f63136918932385a (diff)
downloadop-kernel-dev-b5c784894c90042f4fc6348aedc7524e899df281.zip
op-kernel-dev-b5c784894c90042f4fc6348aedc7524e899df281.tar.gz
Merge branch 'topic/asoc' into for-linus
Diffstat (limited to 'sound/soc/pxa/palm27x.c')
-rw-r--r--sound/soc/pxa/palm27x.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/sound/soc/pxa/palm27x.c b/sound/soc/pxa/palm27x.c
index 4a9cf30..48a73f6 100644
--- a/sound/soc/pxa/palm27x.c
+++ b/sound/soc/pxa/palm27x.c
@@ -55,7 +55,7 @@ static void palm27x_ext_control(struct snd_soc_codec *codec)
static int palm27x_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 */
palm27x_ext_control(codec);
@@ -146,19 +146,16 @@ static const struct snd_kcontrol_new palm27x_controls[] = {
static int palm27x_ac97_init(struct snd_soc_codec *codec)
{
- int i, err;
+ int err;
snd_soc_dapm_nc_pin(codec, "OUT3");
snd_soc_dapm_nc_pin(codec, "MONOOUT");
/* add palm27x specific controls */
- for (i = 0; i < ARRAY_SIZE(palm27x_controls); i++) {
- err = snd_ctl_add(codec->card,
- snd_soc_cnew(&palm27x_controls[i],
- codec, NULL));
- if (err < 0)
- return err;
- }
+ err = snd_soc_add_controls(codec, palm27x_controls,
+ ARRAY_SIZE(palm27x_controls));
+ if (err < 0)
+ return err;
/* add palm27x specific widgets */
snd_soc_dapm_new_controls(codec, palm27x_dapm_widgets,
OpenPOWER on IntegriCloud