diff options
author | David S. Miller <davem@davemloft.net> | 2009-09-11 23:35:13 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-09-11 23:35:13 -0400 |
commit | cabc5c0f7fa1342049042d6e147db5a73773955b (patch) | |
tree | 2be09ae1777d580c7dfe05d6d5b76e57281ec447 /sound/arm/pxa2xx-ac97.c | |
parent | b73d884756303316ead4cd7dad51236b2a515a1a (diff) | |
parent | 86d710146fb9975f04c505ec78caa43d227c1018 (diff) |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Conflicts:
arch/sparc/Kconfig
Diffstat (limited to 'sound/arm/pxa2xx-ac97.c')
-rw-r--r-- | sound/arm/pxa2xx-ac97.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c index c570ebd9d177..4e34d19ddbc0 100644 --- a/sound/arm/pxa2xx-ac97.c +++ b/sound/arm/pxa2xx-ac97.c | |||
@@ -170,6 +170,13 @@ static int __devinit pxa2xx_ac97_probe(struct platform_device *dev) | |||
170 | struct snd_ac97_bus *ac97_bus; | 170 | struct snd_ac97_bus *ac97_bus; |
171 | struct snd_ac97_template ac97_template; | 171 | struct snd_ac97_template ac97_template; |
172 | int ret; | 172 | int ret; |
173 | pxa2xx_audio_ops_t *pdata = dev->dev.platform_data; | ||
174 | |||
175 | if (dev->id >= 0) { | ||
176 | dev_err(&dev->dev, "PXA2xx has only one AC97 port.\n"); | ||
177 | ret = -ENXIO; | ||
178 | goto err_dev; | ||
179 | } | ||
173 | 180 | ||
174 | ret = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, | 181 | ret = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, |
175 | THIS_MODULE, 0, &card); | 182 | THIS_MODULE, 0, &card); |
@@ -200,6 +207,8 @@ static int __devinit pxa2xx_ac97_probe(struct platform_device *dev) | |||
200 | snprintf(card->longname, sizeof(card->longname), | 207 | snprintf(card->longname, sizeof(card->longname), |
201 | "%s (%s)", dev->dev.driver->name, card->mixername); | 208 | "%s (%s)", dev->dev.driver->name, card->mixername); |
202 | 209 | ||
210 | if (pdata && pdata->codec_pdata[0]) | ||
211 | snd_ac97_dev_add_pdata(ac97_bus->codec[0], pdata->codec_pdata[0]); | ||
203 | snd_card_set_dev(card, &dev->dev); | 212 | snd_card_set_dev(card, &dev->dev); |
204 | ret = snd_card_register(card); | 213 | ret = snd_card_register(card); |
205 | if (ret == 0) { | 214 | if (ret == 0) { |
@@ -212,6 +221,7 @@ err_remove: | |||
212 | err: | 221 | err: |
213 | if (card) | 222 | if (card) |
214 | snd_card_free(card); | 223 | snd_card_free(card); |
224 | err_dev: | ||
215 | return ret; | 225 | return ret; |
216 | } | 226 | } |
217 | 227 | ||