Skip to content

Commit

Permalink
ASoC: pxa2xx-i2s: Add clk_prepare/clk_unprepare calls
Browse files Browse the repository at this point in the history
This patch adds clk_prepare/clk_unprepare calls to the pxa2xx-i2s
driver by using the helper functions clk_prepare_enable and
clk_disable_unprepare.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Philipp Zabel authored and Mark Brown committed Apr 1, 2012
1 parent b19e6e7 commit 5f1cba6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sound/soc/pxa/pxa2xx-i2s.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
struct pxa2xx_pcm_dma_params *dma_data;

BUG_ON(IS_ERR(clk_i2s));
clk_enable(clk_i2s);
clk_prepare_enable(clk_i2s);
clk_ena = 1;
pxa_i2s_wait();

Expand Down Expand Up @@ -258,7 +258,7 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
SACR0 &= ~SACR0_ENB;
pxa_i2s_wait();
if (clk_ena) {
clk_disable(clk_i2s);
clk_disable_unprepare(clk_i2s);
clk_ena = 0;
}
}
Expand Down

0 comments on commit 5f1cba6

Please sign in to comment.