aboutsummaryrefslogtreecommitdiffstats
path: root/sound/atmel/ac97c.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/atmel/ac97c.c')
-rw-r--r--sound/atmel/ac97c.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index bf47025bdf45..9052aff37f64 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -278,14 +278,9 @@ static int atmel_ac97c_capture_hw_params(struct snd_pcm_substream *substream,
278 if (retval < 0) 278 if (retval < 0)
279 return retval; 279 return retval;
280 /* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */ 280 /* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */
281 if (cpu_is_at32ap7000()) { 281 if (cpu_is_at32ap7000() && retval == 1)
282 if (retval < 0) 282 if (test_and_clear_bit(DMA_RX_READY, &chip->flags))
283 return retval; 283 dw_dma_cyclic_free(chip->dma.rx_chan);
284 /* snd_pcm_lib_malloc_pages returns 1 if buffer is changed. */
285 if (retval == 1)
286 if (test_and_clear_bit(DMA_RX_READY, &chip->flags))
287 dw_dma_cyclic_free(chip->dma.rx_chan);
288 }
289 284
290 /* Set restrictions to params. */ 285 /* Set restrictions to params. */
291 mutex_lock(&opened_mutex); 286 mutex_lock(&opened_mutex);
@@ -980,6 +975,7 @@ static int __devinit atmel_ac97c_probe(struct platform_device *pdev)
980 975
981 if (!chip->regs) { 976 if (!chip->regs) {
982 dev_dbg(&pdev->dev, "could not remap register memory\n"); 977 dev_dbg(&pdev->dev, "could not remap register memory\n");
978 retval = -ENOMEM;
983 goto err_ioremap; 979 goto err_ioremap;
984 } 980 }
985 981
@@ -1134,7 +1130,7 @@ err_snd_card_new:
1134 return retval; 1130 return retval;
1135} 1131}
1136 1132
1137#ifdef CONFIG_PM 1133#ifdef CONFIG_PM_SLEEP
1138static int atmel_ac97c_suspend(struct device *pdev) 1134static int atmel_ac97c_suspend(struct device *pdev)
1139{ 1135{
1140 struct snd_card *card = dev_get_drvdata(pdev); 1136 struct snd_card *card = dev_get_drvdata(pdev);