aboutsummaryrefslogtreecommitdiffstats
path: root/sound/arm/pxa2xx-ac97-lib.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 20:09:51 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 20:09:51 -0500
commit932adbed6d99cc373fc3433d701b3a594fea872c (patch)
treed3495817d158f2678c38235b05102ea93d6795be /sound/arm/pxa2xx-ac97-lib.c
parentce519e2327bff01d0eb54071e7044e6291a52aa6 (diff)
parent167968199089435c63ad1140ccfb8c6179274a0a (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ASoC: Fix SND_SOC_ALL_CODECS handling of dual SPI and I2C control buses ASoC: Use snd_soc_dapm_nc_pin() in at91sam9g20ek ASoC: TWL4030: Convert the bitfield enums to VALUE_ENUM type ASoC: New enum type: value_enum pxa2xx-ac97: switch AC unit to correct state before probing ASoC: Clocking fixes for davinci-evm.c ASoC: Mark non-connected TWL4030 pins for pandora ASoC: OMAP: Select OMAP pin multiplexing when using Nokia N810 ASoC drivers
Diffstat (limited to 'sound/arm/pxa2xx-ac97-lib.c')
-rw-r--r--sound/arm/pxa2xx-ac97-lib.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
index ef6539eea579..35afd0c33be5 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -321,10 +321,6 @@ int __devinit pxa2xx_ac97_hw_probe(struct platform_device *dev)
321{ 321{
322 int ret; 322 int ret;
323 323
324 ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, 0, "AC97", NULL);
325 if (ret < 0)
326 goto err;
327
328 if (cpu_is_pxa25x() || cpu_is_pxa27x()) { 324 if (cpu_is_pxa25x() || cpu_is_pxa27x()) {
329 pxa_gpio_mode(GPIO31_SYNC_AC97_MD); 325 pxa_gpio_mode(GPIO31_SYNC_AC97_MD);
330 pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD); 326 pxa_gpio_mode(GPIO30_SDATA_OUT_AC97_MD);
@@ -339,7 +335,7 @@ int __devinit pxa2xx_ac97_hw_probe(struct platform_device *dev)
339 if (IS_ERR(ac97conf_clk)) { 335 if (IS_ERR(ac97conf_clk)) {
340 ret = PTR_ERR(ac97conf_clk); 336 ret = PTR_ERR(ac97conf_clk);
341 ac97conf_clk = NULL; 337 ac97conf_clk = NULL;
342 goto err_irq; 338 goto err_conf;
343 } 339 }
344 } 340 }
345 341
@@ -347,19 +343,30 @@ int __devinit pxa2xx_ac97_hw_probe(struct platform_device *dev)
347 if (IS_ERR(ac97_clk)) { 343 if (IS_ERR(ac97_clk)) {
348 ret = PTR_ERR(ac97_clk); 344 ret = PTR_ERR(ac97_clk);
349 ac97_clk = NULL; 345 ac97_clk = NULL;
350 goto err_irq; 346 goto err_clk;
351 } 347 }
352 348
353 return clk_enable(ac97_clk); 349 ret = clk_enable(ac97_clk);
350 if (ret)
351 goto err_clk2;
352
353 ret = request_irq(IRQ_AC97, pxa2xx_ac97_irq, IRQF_DISABLED, "AC97", NULL);
354 if (ret < 0)
355 goto err_irq;
356
357 return 0;
354 358
355err_irq: 359err_irq:
356 GCR |= GCR_ACLINK_OFF; 360 GCR |= GCR_ACLINK_OFF;
361err_clk2:
362 clk_put(ac97_clk);
363 ac97_clk = NULL;
364err_clk:
357 if (ac97conf_clk) { 365 if (ac97conf_clk) {
358 clk_put(ac97conf_clk); 366 clk_put(ac97conf_clk);
359 ac97conf_clk = NULL; 367 ac97conf_clk = NULL;
360 } 368 }
361 free_irq(IRQ_AC97, NULL); 369err_conf:
362err:
363 return ret; 370 return ret;
364} 371}
365EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_probe); 372EXPORT_SYMBOL_GPL(pxa2xx_ac97_hw_probe);