aboutsummaryrefslogtreecommitdiffstats
path: root/sound/atmel/abdac.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/atmel/abdac.c')
-rw-r--r--sound/atmel/abdac.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sound/atmel/abdac.c b/sound/atmel/abdac.c
index 31061e3521d4..023140504104 100644
--- a/sound/atmel/abdac.c
+++ b/sound/atmel/abdac.c
@@ -242,7 +242,7 @@ static int atmel_abdac_trigger(struct snd_pcm_substream *substream, int cmd)
242 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: /* fall through */ 242 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: /* fall through */
243 case SNDRV_PCM_TRIGGER_RESUME: /* fall through */ 243 case SNDRV_PCM_TRIGGER_RESUME: /* fall through */
244 case SNDRV_PCM_TRIGGER_START: 244 case SNDRV_PCM_TRIGGER_START:
245 clk_enable(dac->sample_clk); 245 clk_prepare_enable(dac->sample_clk);
246 retval = dw_dma_cyclic_start(dac->dma.chan); 246 retval = dw_dma_cyclic_start(dac->dma.chan);
247 if (retval) 247 if (retval)
248 goto out; 248 goto out;
@@ -254,7 +254,7 @@ static int atmel_abdac_trigger(struct snd_pcm_substream *substream, int cmd)
254 dw_dma_cyclic_stop(dac->dma.chan); 254 dw_dma_cyclic_stop(dac->dma.chan);
255 dac_writel(dac, DATA, 0); 255 dac_writel(dac, DATA, 0);
256 dac_writel(dac, CTRL, 0); 256 dac_writel(dac, CTRL, 0);
257 clk_disable(dac->sample_clk); 257 clk_disable_unprepare(dac->sample_clk);
258 break; 258 break;
259 default: 259 default:
260 retval = -EINVAL; 260 retval = -EINVAL;
@@ -429,7 +429,7 @@ static int atmel_abdac_probe(struct platform_device *pdev)
429 retval = PTR_ERR(sample_clk); 429 retval = PTR_ERR(sample_clk);
430 goto out_put_pclk; 430 goto out_put_pclk;
431 } 431 }
432 clk_enable(pclk); 432 clk_prepare_enable(pclk);
433 433
434 retval = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1, 434 retval = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1,
435 SNDRV_DEFAULT_STR1, THIS_MODULE, 435 SNDRV_DEFAULT_STR1, THIS_MODULE,
@@ -528,7 +528,7 @@ out_free_card:
528 snd_card_free(card); 528 snd_card_free(card);
529out_put_sample_clk: 529out_put_sample_clk:
530 clk_put(sample_clk); 530 clk_put(sample_clk);
531 clk_disable(pclk); 531 clk_disable_unprepare(pclk);
532out_put_pclk: 532out_put_pclk:
533 clk_put(pclk); 533 clk_put(pclk);
534 return retval; 534 return retval;
@@ -541,8 +541,8 @@ static int atmel_abdac_suspend(struct device *pdev)
541 struct atmel_abdac *dac = card->private_data; 541 struct atmel_abdac *dac = card->private_data;
542 542
543 dw_dma_cyclic_stop(dac->dma.chan); 543 dw_dma_cyclic_stop(dac->dma.chan);
544 clk_disable(dac->sample_clk); 544 clk_disable_unprepare(dac->sample_clk);
545 clk_disable(dac->pclk); 545 clk_disable_unprepare(dac->pclk);
546 546
547 return 0; 547 return 0;
548} 548}
@@ -552,8 +552,8 @@ static int atmel_abdac_resume(struct device *pdev)
552 struct snd_card *card = dev_get_drvdata(pdev); 552 struct snd_card *card = dev_get_drvdata(pdev);
553 struct atmel_abdac *dac = card->private_data; 553 struct atmel_abdac *dac = card->private_data;
554 554
555 clk_enable(dac->pclk); 555 clk_prepare_enable(dac->pclk);
556 clk_enable(dac->sample_clk); 556 clk_prepare_enable(dac->sample_clk);
557 if (test_bit(DMA_READY, &dac->flags)) 557 if (test_bit(DMA_READY, &dac->flags))
558 dw_dma_cyclic_start(dac->dma.chan); 558 dw_dma_cyclic_start(dac->dma.chan);
559 559
@@ -572,7 +572,7 @@ static int atmel_abdac_remove(struct platform_device *pdev)
572 struct atmel_abdac *dac = get_dac(card); 572 struct atmel_abdac *dac = get_dac(card);
573 573
574 clk_put(dac->sample_clk); 574 clk_put(dac->sample_clk);
575 clk_disable(dac->pclk); 575 clk_disable_unprepare(dac->pclk);
576 clk_put(dac->pclk); 576 clk_put(dac->pclk);
577 577
578 dma_release_channel(dac->dma.chan); 578 dma_release_channel(dac->dma.chan);