aboutsummaryrefslogtreecommitdiff
path: root/sound/soc/pxa
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-01 21:45:47 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-07-01 21:45:47 +0100
commit2115d2c17369df4b70fd161623a40ce98c261989 (patch)
treec672922435427d7fb304eee41fca52bd369924fc /sound/soc/pxa
parent1dcf98ff8e2a4571a2accb852686023b47ca629a (diff)
parentda9ff1f796e81976935407251815838bef9868d4 (diff)
Merge branch 'for-2.6.31' into for-2.6.32
Diffstat (limited to 'sound/soc/pxa')
-rw-r--r--sound/soc/pxa/pxa2xx-i2s.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/soc/pxa/pxa2xx-i2s.c b/sound/soc/pxa/pxa2xx-i2s.c
index 4743e262895..6b8f655d1ad 100644
--- a/sound/soc/pxa/pxa2xx-i2s.c
+++ b/sound/soc/pxa/pxa2xx-i2s.c
@@ -167,6 +167,7 @@ static int pxa2xx_i2s_hw_params(struct snd_pcm_substream *substream,
BUG_ON(IS_ERR(clk_i2s));
clk_enable(clk_i2s);
+ dai->private_data = dai;
pxa_i2s_wait();
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
@@ -255,7 +256,10 @@ static void pxa2xx_i2s_shutdown(struct snd_pcm_substream *substream,
if ((SACR1 & (SACR1_DREC | SACR1_DRPL)) == (SACR1_DREC | SACR1_DRPL)) {
SACR0 &= ~SACR0_ENB;
pxa_i2s_wait();
- clk_disable(clk_i2s);
+ if (dai->private_data != NULL) {
+ clk_disable(clk_i2s);
+ dai->private_data = NULL;
+ }
}
}
@@ -336,6 +340,7 @@ static int pxa2xx_i2s_probe(struct platform_device *dev)
return PTR_ERR(clk_i2s);
pxa_i2s_dai.dev = &dev->dev;
+ pxa_i2s_dai.private_data = NULL;
ret = snd_soc_register_dai(&pxa_i2s_dai);
if (ret != 0)
clk_put(clk_i2s);